Skip to content

Commit 9fb63e7

Browse files
邓鑫邓鑫
authored andcommitted
apache#9351 add some comments
1 parent ad80db5 commit 9fb63e7

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

‎fe/fe-core/src/main/java/org/apache/doris/load/Load.java‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,6 +1045,7 @@ private static void initColumns(Table tbl, List<ImportColumnDesc> columnExprs,
10451045
return;
10461046
}
10471047

1048+
// load sql '(a, b)set(c=a, d=b)', tmpSet save {a,b}.
10481049
Set<String> tmpSet = Sets.newHashSet();
10491050
for (ImportColumnDesc importColumnDesc : copiedColumnExprs) {
10501051
if (importColumnDesc.getExpr() == null) {
@@ -1057,10 +1058,10 @@ private static void initColumns(Table tbl, List<ImportColumnDesc> columnExprs,
10571058
// make column name case match with real column name
10581059
String columnName = importColumnDesc.getColumnName();
10591060
String realColName;
1060-
if (tbl.getColumn(columnName) == null || tmpSet.contains(columnName) ){
1061+
if (tbl.getColumn(columnName) == null || tmpSet.contains(columnName)) {
10611062
realColName = columnName;
10621063
} else {
1063-
realColName = tbl.getColumn(columnName).getName();
1064+
realColName = tbl.getColumn(columnName).getName();
10641065
}
10651066
if (importColumnDesc.getExpr() != null) {
10661067
Expr expr = transformHadoopFunctionExpr(tbl, realColName, importColumnDesc.getExpr());

‎fe/fe-core/src/main/java/org/apache/doris/planner/StreamLoadScanNode.java‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ public class StreamLoadScanNode extends LoadScanNode {
6666
private TupleDescriptor srcTupleDesc;
6767
private TBrokerScanRange brokerScanRange;
6868

69+
// If use case sensitive map, for example,
70+
// the column name 「A」 in the table and the mapping '(a) set (A = a)' in load sql,
71+
// Slotdescbyname stores「a」, later will use 「a」to get table's 「A」 column info, will throw exception.
6972
private Map<String, SlotDescriptor> slotDescByName = Maps.newTreeMap(String.CASE_INSENSITIVE_ORDER);
7073
private Map<String, Expr> exprsByName = Maps.newTreeMap(String.CASE_INSENSITIVE_ORDER);
7174

0 commit comments

Comments
 (0)