imay commented on a change in pull request #1592: Broker load supports function
URL: https://github.com/apache/incubator-doris/pull/1592#discussion_r311884671
##########
File path: fe/src/main/java/org/apache/doris/analysis/DataDescription.java
##########
@@ -189,92 +186,100 @@ public boolean isPullLoad() {
return isPullLoad;
}
- private void checkColumnInfo() throws AnalysisException {
- if (columnNames == null || columnNames.isEmpty()) {
+ /**
+ * Analyze parsedExprMap and columnToFunction from columns and
columnMappingList
+ * Example: columns (col1, tmp_col2, tmp_col3) set (col2=tmp_col2+1,
col3=strftime("%Y-%m-%d %H:%M:%S", tmp_col3))
+ * Result: parsedExprMap = {"col1": null, "tmp_col2": null, "tmp_col3":
null,
+ * "col2": "tmp_col2+1", "col3": "strftime("%Y-%m-%d %H:%M:%S", tmp_col3)"}
+ */
+ private void analyzeColumns() throws AnalysisException {
+ if (columns == null || columns.isEmpty()) {
return;
}
- Set<String> columnSet = Sets.newTreeSet(String.CASE_INSENSITIVE_ORDER);
- for (String col : columnNames) {
- if (!columnSet.add(col)) {
-
ErrorReport.reportAnalysisException(ErrorCode.ERR_DUP_FIELDNAME, col);
+ // merge columns exprs from columns and columnMappingList
+ // used to check duplicated column name
+ Set<String> columnNames = Sets.newHashSet();
Review comment:
we should use case insensitive compare for column name.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]