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/23 15:21:21 UTC

[GitHub] [incubator-doris] morningman commented on a change in pull request #7207: [feat](flink-connector) add BATCH DELETE support

morningman commented on a change in pull request #7207:
URL: https://github.com/apache/incubator-doris/pull/7207#discussion_r755235863



##########
File path: extension/flink-doris-connector/src/main/java/org/apache/doris/flink/cfg/DorisExecutionOptions.java
##########
@@ -105,6 +111,25 @@ public Builder setStreamLoadProp(Properties streamLoadProp) {
             return this;
         }
 
+        public Builder setJsonFormat() {
+            this.streamLoadProp.setProperty("format", "json");
+            this.streamLoadProp.setProperty("strip_outer_array", "true");
+            return this;
+        }
+
+        public Builder setMergeType(MergeType mergeType) {
+            this.streamLoadProp.setProperty("merge_type", mergeType.toString());
+            return this;
+        }
+
+        public Builder setDeleteLabel(String deleteLabel, String value) {
+            if (!MergeType.MERGE.toString().equals(this.streamLoadProp.getProperty("merge_type"))) {
+                return this;
+            }
+            this.streamLoadProp.setProperty("delete", deleteLabel + "=" + value);

Review comment:
       the delete flag can be any expressions. For example:
   
   `delete: ifnull(column1, 2) > 3`
   
   So could you find a way to make it more flexible?




-- 
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