imay commented on a change in pull request #1635: Enable parsing columns from 
file path for Broker Load (#1582)
URL: https://github.com/apache/incubator-doris/pull/1635#discussion_r314608503
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/load/Load.java
 ##########
 @@ -651,11 +651,15 @@ public static void checkAndCreateSource(Database db, 
DataDescription dataDescrip
             for (Column column : tableSchema) {
                 nameToTableColumn.put(column.getName(), column);
             }
-
-            // source columns
             List<String> columnNames = Lists.newArrayList();
-            List<String> assignColumnNames = dataDescription.getColumnNames();
-            if (assignColumnNames == null) {
+            List<String> assignColumnNames = Lists.newArrayList();
+            if (dataDescription.getColumnNames() != null) {
+                assignColumnNames.addAll(dataDescription.getColumnNames());
+            }
+            if (dataDescription.getColumnsFromPath() != null) {
 
 Review comment:
   If user specify columnFromPath without columnList,
   I think we should return user's error message in LoadStatement analyze 
function.
   For here, we should check dataDescription.getColumnsFromPath() in `if 
(dataDescription.getColumnNames() != null)` block

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@doris.apache.org
For additional commands, e-mail: dev-h...@doris.apache.org

Reply via email to