viirya commented on code in PR #8940:
URL: https://github.com/apache/arrow-datafusion/pull/8940#discussion_r1461207885


##########
datafusion/sqllogictest/test_files/aggregate.slt:
##########
@@ -3276,6 +3276,26 @@ SELECT MAX(col0) FROM empty WHERE col0=1;
 ----
 NULL
 
+query TT
+EXPLAIN SELECT MIN(col0) FROM empty;
+----
+logical_plan
+Aggregate: groupBy=[[]], aggr=[[MIN(empty.col0)]]
+--TableScan: empty projection=[col0]
+physical_plan
+ProjectionExec: expr=[NULL as MIN(empty.col0)]
+--PlaceholderRowExec

Review Comment:
   Before this patch, the query plan looks like:
   
   ```
   logical_plan
   Aggregate: groupBy=[[]], aggr=[[MIN(empty.col0)]]
   --TableScan: empty projection=[col0]
   physical_plan
   AggregateExec: mode=Single, gby=[], aggr=[MIN(empty.col0)]
   --MemoryExec: partitions=1, partition_sizes=[0]
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to