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 2020/07/29 07:16:39 UTC

[GitHub] [incubator-doris] yangzhg commented on a change in pull request #4141: Support batch delete syntax in fe and add pass the delete infomation to be

yangzhg commented on a change in pull request #4141:
URL: https://github.com/apache/incubator-doris/pull/4141#discussion_r461267976



##########
File path: be/src/exec/broker_scan_node.cpp
##########
@@ -71,6 +71,18 @@ Status BrokerScanNode::init(const TPlanNode& tnode, RuntimeState* state) {
                   _partition_infos.end(),
                   compare_part_use_range);
     }
+    if (broker_scan_node.__isset.delete_conjuncts) {
+        RETURN_IF_ERROR(Expr::create_expr_trees(
+                _pool, broker_scan_node.delete_conjuncts, &_delete_expr_ctxs));
+    }
+    if (broker_scan_node.__isset.merge_type) {
+        _merge_type = broker_scan_node.merge_type;
+    } else {
+        _merge_type = TMergeType::APPEND;
+    }
+    if (_merge_type != TMergeType::MERGE && _delete_expr_ctxs.size() > 0) {
+        return Status::InvalidArgument("cannot support delete condition in APPEND or DELETE load.");

Review comment:
       delete on condition is for MERGE load,  APPEND is append all data in this load, DELETE is drop all data in this load, Merge is delete all data match delete condition and append others

##########
File path: fe/fe-core/src/main/java/org/apache/doris/load/routineload/RoutineLoadJob.java
##########
@@ -280,7 +287,11 @@ protected void setOptional(CreateRoutineLoadStmt stmt) throws UserException {
         if (stmt.getMaxBatchSize() != -1) {
             this.maxBatchSizeBytes = stmt.getMaxBatchSize();
         }
+        if (stmt.getExecMemLimit() != -1) {
+            this.execMemLimit = stmt.getExecMemLimit();

Review comment:
       execMemLimit in all load's property except routine load, add this just for keeping syntax consist.

##########
File path: fe/fe-core/pom.xml
##########
@@ -458,7 +458,7 @@ under the License.
                     <!--<cupDefinition>${doris.home}/gensrc/parser/sql_parser.cup</cupDefinition>-->
                     <className>SqlParser</className>
                     <symbolsName>SqlParserSymbols</symbolsName>
-                    <expectedConflicts>6</expectedConflicts>
+                    <expectedConflicts>7</expectedConflicts>

Review comment:
       this will be 0 after the he 




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



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