caiconghui commented on a change in pull request #4006:
URL: https://github.com/apache/incubator-doris/pull/4006#discussion_r450646519



##########
File path: fe/src/main/java/org/apache/doris/load/DeleteHandler.java
##########
@@ -569,6 +587,19 @@ private void checkDeleteV2(OlapTable table, Partition 
partition, List<Predicate>
                     sb.append(" IS NULL");
                 }
                 deleteConditions.add(sb.toString());
+            } else if (condition instanceof InPredicate) {
+                InPredicate inPredicate = (InPredicate) condition;
+                SlotRef slotRef = (SlotRef) inPredicate.getChild(0);
+                String columnName = slotRef.getColumnName();
+                StringBuilder strBuilder = new StringBuilder();
+                String notStr = inPredicate.isNotIn() ? "NOT " : "";
+                strBuilder.append(columnName).append(" " + notStr + "IN (");
+                for (int i = 1; i <= inPredicate.getInElementNum(); ++i) {
+                    strBuilder.append(inPredicate.getChild(i).toSql());
+                    strBuilder.append((i + 1 != inPredicate.getInElementNum()) 
? ", " : "");

Review comment:
       oh, mybad,thanks,I will fix it

##########
File path: fe/src/main/java/org/apache/doris/load/DeleteHandler.java
##########
@@ -569,6 +587,19 @@ private void checkDeleteV2(OlapTable table, Partition 
partition, List<Predicate>
                     sb.append(" IS NULL");
                 }
                 deleteConditions.add(sb.toString());
+            } else if (condition instanceof InPredicate) {
+                InPredicate inPredicate = (InPredicate) condition;
+                SlotRef slotRef = (SlotRef) inPredicate.getChild(0);
+                String columnName = slotRef.getColumnName();
+                StringBuilder strBuilder = new StringBuilder();
+                String notStr = inPredicate.isNotIn() ? "NOT " : "";
+                strBuilder.append(columnName).append(" " + notStr + "IN (");
+                for (int i = 1; i <= inPredicate.getInElementNum(); ++i) {
+                    strBuilder.append(inPredicate.getChild(i).toSql());
+                    strBuilder.append((i + 1 != inPredicate.getInElementNum()) 
? ", " : "");

Review comment:
       oh, my bad,thanks,I will fix it




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



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

Reply via email to