nuno-faria commented on code in PR #17165:
URL: https://github.com/apache/datafusion/pull/17165#discussion_r2273201142


##########
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:
   Without `reverse_expr` the `requirement` in that function will stay `None`, 
which means `get_finer_aggregate_exprs_requirement` returns an empty list. 
Maybe @berkaysynnada can clarify the behavior.



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