findepi commented on code in PR #17165:
URL: https://github.com/apache/datafusion/pull/17165#discussion_r2273519500


##########
datafusion/sqllogictest/test_files/aggregate.slt:
##########
@@ -6162,6 +6162,28 @@ from t;
 ----
 a,c,d,b
 
+query TT
+explain select string_agg(k, ',' order by v) from t;
+----
+logical_plan
+01)Aggregate: groupBy=[[]], aggr=[[string_agg(t.k, Utf8(",")) ORDER BY [t.v 
ASC NULLS LAST]]]     
+02)--TableScan: t projection=[k, v]
+physical_plan
+01)AggregateExec: mode=Single, gby=[], aggr=[string_agg(t.k,Utf8(",")) ORDER 
BY [t.v ASC NULLS LAST]]
+02)--SortExec: expr=[v@1 ASC NULLS LAST], preserve_partitioning=[false]
+03)----DataSourceExec: partitions=1, partition_sizes=[1]
+
+query TT
+explain select string_agg(k, ',' order by v desc) from t;

Review Comment:
   Are we hitting this loop exit path as expected?
   
   
https://github.com/apache/datafusion/blob/e1a5cdf6db791ea50b4028d6eb11ffafd940b29b/datafusion/physical-plan/src/aggregates/mod.rs#L1188-L1195
   



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

Reply via email to