insertColumnMap = table.getColumnMap();
insertColumnCheckList = table.getNewColumnCheckList();
OrderedHashSet updateTargetSet = new OrderedHashSet();
OrderedHashSet insertColNames = new OrderedHashSet();
LongDeque updateColIndexList = new LongDeque();
readMergeWhen(updateColIndexList, insertColNames, updateTargetSet,
insertList, updateList, targetRangeVars, sourceRange);
if (insertList.size() > 0) {
int colCount = insertColNames.size();
if (colCount != 0) {
insertColumnMap = table.getColumnIndexes(insertColNames);
insertColumnCheckList =
table.getColumnCheckList(insertColumnMap);
}
insertExpression = (Expression) insertList.get(0);
setParameterTypes(insertExpression, table, insertColumnMap);
}
if (updateList.size() > 0) {
targets = new Expression[updateTargetSet.size()];
updateTargetSet.toArray(targets);
for (int i = 0; i < targets.length; i++) {
this.resolveOuterReferencesAndTypes(outerRanges, targets[i]);
}
updateExpressions = new Expression[updateList.size()];
updateList.toArray(updateExpressions);
updateColumnMap = new int[updateColIndexList.size()];
updateColIndexList.toArray(updateColumnMap);
}
if (updateExpressions.length != 0) {
Table baseTable = table.getBaseTable();