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

Filter/Agg transpose bugfix #252

Merged
merged 4 commits into from
Dec 6, 2024
Merged

Filter/Agg transpose bugfix #252

merged 4 commits into from
Dec 6, 2024

Conversation

jurplel
Copy link
Member

@jurplel jurplel commented Dec 5, 2024

The check for whether or not a filter expression could be pushed beyond an agg node was incorrect.

It was checking if the column was in the group by columns (checking the equality of the numbers), when it should be checking based on indices if we are only referring to columns that are emitted from the agg node as group by columns.

For example, if we see:

Filter #1 > 100
    Agg { groups: [#1], agg: Sum() }

We should not push down because #1 refers to the sum column. In the current main branch, it is pushed down because it sees that #1 equals a column in the groups field. It should be checking that every column is < groups.len() instead.

@jurplel jurplel marked this pull request as ready for review December 5, 2024 22:57
@jurplel jurplel requested review from skyzh and yliang412 December 5, 2024 22:58
@jurplel jurplel enabled auto-merge (squash) December 6, 2024 00:17
@jurplel jurplel merged commit 5f26d36 into main Dec 6, 2024
1 check passed
@jurplel jurplel deleted the bowad/unnest-type-bugfix branch December 6, 2024 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants