jayzhan211 commented on code in PR #14824: URL: https://github.com/apache/datafusion/pull/14824#discussion_r1971489661
########## datafusion/core/tests/dataframe/mod.rs: ########## @@ -2455,7 +2455,7 @@ async fn test_count_wildcard_on_sort() -> Result<()> { let ctx = create_join_context()?; let sql_results = ctx - .sql("select b,count(*) from t1 group by b order by count(*)") + .sql("select b,count(1) from t1 group by b order by count(1)") Review Comment: ``` left: "+---------------+------------------------------------------------------------------------------------------------------------+\n| plan_type | plan |\n+---------------+------------------------------------------------------------------------------------------------------------+\n| logical_plan | Projection: t1.b, count(*) |\n| | Sort: count(Int64(1)) AS count(*) AS count(*) ASC NULLS LAST |\n| | Projection: t1.b, count(Int64(1)) AS count(*), count(Int64(1)) |\n| | Aggregate: groupBy=[[t1.b]], aggr=[[count(Int64(1))]] |\n| | TableScan: t1 projection=[b] |\n| physical_plan | ProjectionExec: expr=[b@0 as b, count(*)@1 as count(*)] |\n| | SortPreservingMergeExec: [count(Int64(1))@2 ASC NULLS LAST] |\n| | SortExec: expr=[count(Int64(1))@2 ASC NULLS LAST], preserve_partitioning=[true] |\n| | ProjectionExec: expr=[b@0 as b, count(Int64(1))@1 as count(*), count(Int64(1))@1 as count(Int64(1))] |\n| | AggregateExec: mode=FinalPartitioned, gby=[b@0 as b], aggr=[count(Int64(1))] |\n| | CoalesceBatchesExec: target_batch_size=8192 |\n| | RepartitionExec: partitioning=Hash([b@0], 12), input_partitions=12 |\n| | RepartitionExec: partitioning=R oundRobinBatch(12), input_partitions=1 |\n| | AggregateExec: mode=Partial, gby=[b@0 as b], aggr=[count(Int64(1))] |\n| | DataSourceExec: partitions=1, partition_sizes=[1] |\n| | |\n+---------------+------------------------------------------------------------------------------------------------------------+" right: "+---------------+-----------------------------------------------------------------------------------+\n| plan_type | plan |\n+---------------+-----------------------------------------------------------------------------------+\n| logical_plan | Sort: count(Int64(1)) ASC NULLS LAST |\n| | Aggregate: groupBy=[[t1.b]], aggr=[[count(Int64(1))]] |\n| | TableScan: t1 projection=[b] |\n| physical_plan | SortPreservingMergeExec: [count(Int64(1))@1 ASC NULLS LAST] |\n| | SortExec: expr=[count(Int64(1))@1 ASC NULLS LAST], preserve_partitioning=[true] |\n| | AggregateExec: mode=FinalPartitioned, gby=[b@0 as b], aggr=[count(Int64(1))] |\n| | CoalesceBatchesExec: target_batch_s ize=8192 |\n| | RepartitionExec: partitioning=Hash([b@0], 12), input_partitions=12 |\n| | RepartitionExec: partitioning=RoundRobinBatch(12), input_partitions=1 |\n| | AggregateExec: mode=Partial, gby=[b@0 as b], aggr=[count(Int64(1))] |\n| | DataSourceExec: partitions=1, partition_sizes=[1] |\n| | |\n+---------------+-----------------------------------------------------------------------------------+" ``` This is the err after changing it back to count(*) we have additional projection now ``` Projection: t1.b, count(Int64(1)) AS count(*), count(Int64(1)) ``` -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org