-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[BUG]: windows frame don't support scalars in ORDER BY/PARTITION BY clauses #8386
Comments
This is not yet fixed (I had hoped it would be in #8371)
|
The problem is a little bit wider: not only null problem, DF cannot handle scalars at all in window frame
For PG this query is valid. I'll take a look |
partition by null
and order by null
and cause error
Moving discussion from PR to the ticket @mustafasrepo can I have your input please. The reason is the query fails
The reason for that is optimize_projections removes the unused fields and this breaks the consistency. The question for you, what do you think is expected behavior for such rare case? PS. If add a column name to projection or to ORDER BY it will expectedly work. |
I expect this query to work. I understood the root cause of this problem (explained in the PR body). This PR solves this issue. Thanks @comphead for discovering this bug. |
I want to ask a question regarding the scalars inside Is there any difference between results of |
I do not know of any difference in these queries Rewriting the query sounds like an elegant solution to me. I suggest we do the rewrite in the analyzer pass (rather than SQL planner) so such queries can also be run via the DataFrame API |
Thank you guys, great work to close multiple issues related to this corner case, I created another PR for |
Describe the bug
During work on #8371, @comphead proposed that we can test
partition by null
andorder by null
I test this and find
partition by null
andorder by null
will fail in all windows function(maybe, I'm not test all)To Reproduce
No response
Expected behavior
correct work like duckdb
Additional context
No response
The text was updated successfully, but these errors were encountered: