morrySnow commented on code in PR #26677:
URL: https://github.com/apache/doris/pull/26677#discussion_r1388969608


##########
regression-test/suites/nereids_p0/explain/test_pushdown_explain.groovy:
##########
@@ -25,4 +25,44 @@ suite("test_pushdown_explain") {
         contains "PREDICATES:"
     }
     qt_select "select k1 from baseall where k1 = 1"
+
+    sql "DROP TABLE IF EXISTS test_lineorder"
+    sql """ CREATE TABLE `test_lineorder` (
+        `lo_orderkey` INT NOT NULL COMMENT '\"\"',
+        `lo_linenumber` INT NOT NULL COMMENT '\"\"',
+        `lo_shipmode` VARCHAR(11) NOT NULL COMMENT '\"\"'
+    ) ENGINE=OLAP
+    DUPLICATE KEY(`lo_orderkey`)
+    DISTRIBUTED BY HASH(`lo_orderkey`) BUCKETS 48
+    PROPERTIES (
+        "replication_allocation" = "tag.location.default: 1",
+        "min_load_replica_num" = "-1",
+        "is_being_synced" = "false",
+        "colocate_with" = "groupa1",
+        "storage_format" = "V2",
+        "light_schema_change" = "true",
+        "disable_auto_compaction" = "false",
+        "enable_single_replica_compaction" = "false"
+    ); """
+    sql """ insert into test_lineorder values(1,2,"asd"); """
+    explain {
+        sql("select count(1) from test_lineorder;")
+        contains "pushAggOp=COUNT"
+    }
+    explain {
+        sql("select count(*) from test_lineorder;")
+        contains "pushAggOp=COUNT"
+    }
+    explain {
+        sql("select count(1) - count(lo_shipmode) from test_lineorder;")
+        contains "pushAggOp=COUNT"
+    }
+    explain {
+        sql("select count(lo_orderkey) from test_lineorder;")
+        contains "pushAggOp=COUNT"
+    }
+    explain {
+        sql("select count(cast(lo_orderkey as bigint)) from test_lineorder;")
+        contains "pushAggOp=COUNT"

Review Comment:
   why chould push count column without change any code of execution engine? 
count column is not same with count const value or count star. count column do 
not count null slot. btw, the original code already support push count value 
and push star



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