-
Notifications
You must be signed in to change notification settings - Fork 646
distinct aggregate should distinct on all arguments instead of only the first #10942
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This issue has been open for 60 days with no activity. If you think it is still relevant today, and needs to be done in the near future, you can comment to update the status, or just manually remove the You can also confidently close this issue as not planned to keep our backlog clean. |
IIUC, PG does not support that
But it support
|
I mean the functions that accept more than 1 arguments, e.g. create table t (a int, b int);
insert into t values (1, 1), (2, 2), (2, 3), (2, 2), (3, 3), (4, 4);
select string_agg(distinct a::text || ']', '[' || b::text) from t; PG allows distinct in function call accepting multiple arguments, and the semantics is to distinct on all of the arguments. Currently we don't support this. For |
appalled to know that |
Uh oh!
There was an error while loading. Please reload this page.
Previously
string_agg
misbehave due to this issue ifDistinctAggRule
is not applied (#10826). After the fix #10864,string_agg
now only allow constantdelim
when specifyingDISTINCT
option, while the issue still remains. Currently it doesn't cause any substantial harm, but may need to be fixed if users require multiple non-const distinct arguments when using later UDAF feature, so leave this issue just as a reminder.cc @wangrunji0408
The text was updated successfully, but these errors were encountered: