Skip to content

[MINOR]: Add size check for aggregate - #8813

Merged
mustafasrepo merged 3 commits into
apache:mainfrom
synnada-ai:minor/aggregate_size_check
Jan 11, 2024
Merged

mustafasrepo merged 3 commits into
apache:mainfrom
synnada-ai:minor/aggregate_size_check

Conversation

@mustafasrepo

@mustafasrepo mustafasrepo commented Jan 10, 2024 •

Copy link
Copy Markdown
Contributor

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

@metesynnada metesynnada left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Simple change, LGTM.

@alamb alamb left a comment

Copy link
Copy Markdown
Contributor

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

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