nextdreamblue commented on code in PR #17146:
URL: https://github.com/apache/doris/pull/17146#discussion_r1118416846


##########
be/src/olap/rowset/segment_v2/segment_iterator.cpp:
##########
@@ -379,7 +379,17 @@ Status 
SegmentIterator::_get_row_ranges_from_conditions(RowRanges* condition_row
         DCHECK(_opts.col_id_to_predicates.count(cid) > 0);
         
RETURN_IF_ERROR(_column_iterators[_schema.unique_id(cid)]->get_row_ranges_by_zone_map(
                 _opts.col_id_to_predicates[cid].get(),
-                _opts.col_id_to_del_predicates.count(cid) > 0
+                // Currently, one transaction can only support one delete 
condition for page filtering.

Review Comment:
   ok, i add a todo



##########
regression-test/suites/delete_p0/test_zone_map_delete.groovy:
##########
@@ -54,4 +54,77 @@ suite("test_zone_map_delete") {
     qt_sql """select * from ${tableName} ORDER BY k1;"""
 
     sql """ DROP TABLE IF EXISTS ${tableName} """
+
+    // =========================
+    sql """
+    CREATE TABLE IF NOT EXISTS ${tableName} (
+        `k1` bigint(20) NULL,
+        `k2` largeint(40) NULL,
+        `k3` largeint(40) NULL
+    ) ENGINE=OLAP
+    AGGREGATE KEY(`k1`, `k2`, `k3`)
+    COMMENT 'OLAP'
+    DISTRIBUTED BY HASH(`k1`) BUCKETS 1
+    PROPERTIES (
+    "replication_allocation" = "tag.location.default: 1",
+    "in_memory" = "false",
+    "storage_format" = "V2",
+    "light_schema_change" = "true",
+    "disable_auto_compaction" = "true"
+    );
+    """
+
+
+    sql """ truncate table ${tableName}; """
+
+    sql """ insert into ${tableName} 
values(0,1,11),(0,1,22),(0,1,33),(0,1,44),(0,1,55),(0,1,66),(0,1,77),(0,1,88),(0,1,99),(0,1,100),(0,1,101),(0,1,102),(0,1,11),(0,1,122),(0,1,133),(0,1,144),(0,1,155),(0,1,166),(0,1,177),(0,1,188),(0,1,199),(0,1,200),(0,1,201),(0,1,202);"""
+
+    sql """ delete from ${tableName} where k2 is null and k3=00;"""
+
+    qt_sql """ select k2,k3 from ${tableName};"""
+
+    qt_sql """ select k2,k3 from ${tableName} where k2 is null;"""
+
+    sql """delete from ${tableName} where k2 is not null and k3=11;"""
+
+    qt_sql """select k2,k3 from ${tableName};"""

Review Comment:
   it is better, lei 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.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

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