Skip to content
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

YQL: Cross join results depends on input order #4587

Closed
mxkovalev opened this issue May 16, 2024 · 3 comments · Fixed by #4683 or #7570
Closed

YQL: Cross join results depends on input order #4587

mxkovalev opened this issue May 16, 2024 · 3 comments · Fixed by #4683 or #7570
Assignees
Labels
bug Something isn't working

Comments

@mxkovalev
Copy link
Member

The attached request has cross join over table and window function. Different input order leads to different result. Seems window function doesn't work correctly.

P.S. Roman asked to assign this ticket to you as the main professional in this sphere.

test1_bad_sql.txt
test2_good_sql.txt
trace_opt_1_bad.txt
trace_opt_2_good.txt

@mxkovalev mxkovalev added the bug Something isn't working label May 16, 2024
@Tony-Romanov
Copy link
Collaborator

According to SQL standard, if there is no ORDER BY, the database is free to return the rows in any order it thinks is most efficient.

@mxkovalev
Copy link
Member Author

The question is not about order, Cross Join(a,b) returns 2 rows, Cross Join (b,a) return 30 rows. It looks incorrect.

@mxkovalev mxkovalev reopened this May 16, 2024
@Tony-Romanov Tony-Romanov linked a pull request May 20, 2024 that will close this issue
@mxkovalev mxkovalev reopened this Aug 8, 2024
@mxkovalev
Copy link
Member Author

There is an issue with hang request (internal ticket is YQL-18858). That's why changes were reverted.

@mxkovalev mxkovalev assigned fedor-miron and unassigned Tony-Romanov Aug 8, 2024
@rvu1024 rvu1024 linked a pull request Aug 8, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants