You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/11/03 03:07:38 UTC

[GitHub] [incubator-doris] Gabriel39 commented on a change in pull request #6996: Fix hadoop load failed when enable batch delete in unique table

Gabriel39 commented on a change in pull request #6996:
URL: https://github.com/apache/incubator-doris/pull/6996#discussion_r741591615



##########
File path: fe/fe-core/src/main/java/org/apache/doris/load/Load.java
##########
@@ -758,6 +764,22 @@ public static void checkAndCreateSource(Database db, DataDescription dataDescrip
                         // do nothing
                     }
 
+                } else if (!column.isVisible()) {
+                    /*
+                     *  For batch delete table add hidden column __DORIS_DELETE_SIGN__ to columns
+                     * eg:
+                     * (A, B, C)
+                     * ->
+                     * (A, B, C) SET (__DORIS_DELETE_SIGN__ = 0)
+                     */
+                    columnToHadoopFunction.put(column.getName(), Pair.create("default_value", Lists.newArrayList("0")));
+                    ImportColumnDesc importColumnDesc = null;
+                    try {
+                        importColumnDesc = new ImportColumnDesc(column.getName(), new FunctionCallExpr("default_value", Arrays.asList(column.getDefaultValueExpr())));

Review comment:
       I think it's better to extract `default_value ` to a common constant to decrease hard code




-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org