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

[MINOR]: Add size check for aggregate #8813

Merged
merged 3 commits into from
Jan 11, 2024
Merged

[MINOR]: Add size check for aggregate #8813

merged 3 commits into from
Jan 11, 2024

Conversation

mustafasrepo
Copy link
Contributor

@mustafasrepo mustafasrepo commented Jan 10, 2024

Which issue does this PR close?

Closes #.

Rationale for this change

Aggregate algorithm depends on aggr_expr.len and filter_expr.len() being the same (They are iterated simultaneously with zip). As far as I know, their sizes cannot have different sizes from an SQL query.

However, while writing unit tests, one can easily forget this invariant. This PR adds check for this assumption.

What changes are included in this PR?

With this check, I recognized some of the unit tests, didn't consider this invariant. This PR fixes these tests also.

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added the core Core DataFusion crate label Jan 10, 2024
Copy link
Contributor

@metesynnada metesynnada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simple change, LGTM.

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @mustafasrepo and @metesynnada

@mustafasrepo mustafasrepo merged commit a154884 into apache:main Jan 11, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core DataFusion crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants