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

fix(backends): preserve order_by position in window function when subsequent expressions are duplicated #7943

Merged
merged 2 commits into from
Jan 9, 2024

Conversation

cpcloud
Copy link
Member

@cpcloud cpcloud commented Jan 8, 2024

Description of changes

This PR fixes an issue where duplicate window expressions were given the position of the new (duplicated value)
of the expression, rather than preserving the original order.

This was because we were iterating over the new keys first and putting those expressions into a dict.

BY iterating over the old keys first, we preserve the original order.

Issues closed

Closes #7940.

@cpcloud cpcloud added this to the 8.0 milestone Jan 8, 2024
@cpcloud cpcloud added bug Incorrect behavior inside of ibis bigquery The BigQuery backend regression Issues related to things that used to work but don't anymore labels Jan 8, 2024
@cpcloud cpcloud requested a review from kszucs January 8, 2024 20:49
Copy link
Contributor

github-actions bot commented Jan 8, 2024

ACTION NEEDED

Ibis follows the Conventional Commits specification for release automation.

The PR title and description are used as the merge commit message.

Please update your PR title and description to match the specification.

@cpcloud cpcloud force-pushed the bq-window-ordering-bug branch from 4392e69 to 7074346 Compare January 8, 2024 20:50
@cpcloud cpcloud changed the title fix(backends): ensure that the order_by expressions order is preserved when duplicates are introduced in subsequent expressions fix(backends): preserve order_by order when duplicates are introduced in subsequent expressions Jan 8, 2024
@cpcloud cpcloud force-pushed the bq-window-ordering-bug branch from 7074346 to edde859 Compare January 8, 2024 21:10
@cpcloud cpcloud force-pushed the bq-window-ordering-bug branch from edde859 to e25564c Compare January 8, 2024 21:13
@cpcloud cpcloud changed the title fix(backends): preserve order_by order when duplicates are introduced in subsequent expressions fix(backends): preserve order_by position in window function when subsequent expressions are duplicated Jan 8, 2024
@cpcloud cpcloud force-pushed the bq-window-ordering-bug branch from e25564c to 1082ea1 Compare January 8, 2024 22:25
@kszucs kszucs merged commit 89056b9 into ibis-project:main Jan 9, 2024
80 checks passed
@cpcloud cpcloud deleted the bq-window-ordering-bug branch January 9, 2024 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bigquery The BigQuery backend bug Incorrect behavior inside of ibis regression Issues related to things that used to work but don't anymore
Projects
None yet
2 participants