You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "chenkovsky (via GitHub)" <gi...@apache.org> on 2025/06/26 00:26:32 UTC

Re: [PR] fix: support within_group [datafusion]

chenkovsky commented on code in PR #16538:
URL: https://github.com/apache/datafusion/pull/16538#discussion_r2167848401


##########
datafusion/sqllogictest/test_files/aggregate.slt:
##########
@@ -7040,3 +7040,7 @@ VALUES
 ) GROUP BY 1 ORDER BY 1;
 ----
 x 1
+
+statement error DataFusion error:  Error during planning: WITHIN GROUP clause is not permitted for non-ordered set aggregate function\(array_agg\)
+SELECT array_agg(DISTINCT a_varchar) within group (order by a_varchar)
+FROM (VALUES ('a'), ('d'), ('c'), ('a')) t(a_varchar);

Review Comment:
   I updated this PR to support this feature.



-- 
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-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org