xy720 commented on code in PR #9358: URL: https://github.com/apache/incubator-doris/pull/9358#discussion_r867322207
########## fe/fe-core/src/main/java/org/apache/doris/load/Load.java: ########## @@ -1045,12 +1045,23 @@ private static void initColumns(Table tbl, List<ImportColumnDesc> columnExprs, return; } + Set<String> tmpSet = Sets.newHashSet(); + for (ImportColumnDesc importColumnDesc : copiedColumnExprs) { + if (importColumnDesc.getExpr() == null) { + tmpSet.add(importColumnDesc.getColumnName()); + } + } + // init slot desc add expr map, also transform hadoop functions for (ImportColumnDesc importColumnDesc : copiedColumnExprs) { // make column name case match with real column name String columnName = importColumnDesc.getColumnName(); - String realColName = tbl.getColumn(columnName) == null ? columnName - : tbl.getColumn(columnName).getName(); + String realColName; + if (tbl.getColumn(columnName) == null || tmpSet.contains(columnName) ){ Review Comment: It didn't make sense. Only two case make tbl.getColumn(columnName) != null 1、The columnName match. 2、The columnName match with case insensitive. And you already change exprMap to case insensitive map, so checking tmpSet.contains(columnName) seems no effect at all. ########## fe/fe-core/src/main/java/org/apache/doris/planner/StreamLoadScanNode.java: ########## @@ -66,8 +66,8 @@ public class StreamLoadScanNode extends LoadScanNode { private TupleDescriptor srcTupleDesc; private TBrokerScanRange brokerScanRange; - private Map<String, SlotDescriptor> slotDescByName = Maps.newHashMap(); - private Map<String, Expr> exprsByName = Maps.newHashMap(); + private Map<String, SlotDescriptor> slotDescByName = Maps.newTreeMap(String.CASE_INSENSITIVE_ORDER); + private Map<String, Expr> exprsByName = Maps.newTreeMap(String.CASE_INSENSITIVE_ORDER); Review Comment: ```suggestion private final Map<String, Expr> exprsByName = Maps.newTreeMap(String.CASE_INSENSITIVE_ORDER); ``` ########## fe/fe-core/src/main/java/org/apache/doris/planner/StreamLoadScanNode.java: ########## @@ -66,8 +66,8 @@ public class StreamLoadScanNode extends LoadScanNode { private TupleDescriptor srcTupleDesc; private TBrokerScanRange brokerScanRange; - private Map<String, SlotDescriptor> slotDescByName = Maps.newHashMap(); - private Map<String, Expr> exprsByName = Maps.newHashMap(); + private Map<String, SlotDescriptor> slotDescByName = Maps.newTreeMap(String.CASE_INSENSITIVE_ORDER); Review Comment: ```suggestion private final Map<String, SlotDescriptor> slotDescByName = Maps.newTreeMap(String.CASE_INSENSITIVE_ORDER); ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org