-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Improve error message for LISTAGG window function #16982
Comments
Many RDBMS don't support ordering both the aggregate function and the window function. Even without this support, it's still useful to be able to use |
It's not supported in standard SQL, but it makes sense to add support for listagg in a window context at some point. As @lukaseder explained above, the ORDER BY clauses are independent from each other, so there's no overlap. |
Why not? I don't see any such limitation in ISO/IEC 9075-2:2023(E) 6.10 <window function> |
My bad, you're right -- it assumed it was a special case, but it's handled as any of the other aggregation functions. |
@martint based on quick playing with the code (I may be missing something) it looks like adding |
The window ordering is far less useful in this context than the aggregate ordering. I'd say, without aggregate ordering, the What I've seen in most other RDBMS that have difficulties supporting both orderings is that they don't support the window ordering but do support the aggregate ordering of this function. |
building block: #23929 |
LISTAGG
currently can't be used as a window function, it seems:This produces:
I think it would be useful to either:
The text was updated successfully, but these errors were encountered: