Skip to content

Move aggregate statistic , combine aggregate and limited distinct aggregate test to slt #10554

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

Closed
wants to merge 2 commits into from

Conversation

jayzhan211
Copy link
Contributor

Which issue does this PR close?

Part of #10384

Rationale for this change

There are some tests that use AggregateExpr::Count directly, which makes it difficult for #10484
Move all test that has AggregateExpr to slt if possible.

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

Signed-off-by: jayzhan211 <[email protected]>
@github-actions github-actions bot added core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) labels May 17, 2024
)?;

// We introduce an intermediate optimization step between the partial and final aggregtator
let coalesce = CoalescePartitionsExec::new(Arc::new(partial_agg));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since the optimized code does not have specific behavior on the non-indirect plan, I think the test is not necessary

Signed-off-by: jayzhan211 <[email protected]>
@jayzhan211 jayzhan211 changed the title Minor: Move aggregate statistic test to slt Minor: Move aggregate statistic , combine aggregate and limited distinct aggregate test to slt May 17, 2024
@jayzhan211 jayzhan211 changed the title Minor: Move aggregate statistic , combine aggregate and limited distinct aggregate test to slt Move aggregate statistic , combine aggregate and limited distinct aggregate test to slt May 17, 2024
}

#[test]
fn aggregations_with_group_combined() -> Result<()> {
Copy link
Contributor Author

@jayzhan211 jayzhan211 May 17, 2024

Choose a reason for hiding this comment

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

group by and limit tests are not ported because I didn't find a query that has a result of combine aggregate.
But I think it is fine because there is at least one query that covers the test of optimization here, and there is no specific optimization based on group by or limit.

@jayzhan211 jayzhan211 marked this pull request as ready for review May 17, 2024 12:03
@jayzhan211
Copy link
Contributor Author

I think I can use functions-aggregate in physical optimizer directly 🤔

@jayzhan211 jayzhan211 closed this May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core DataFusion crate sqllogictest SQL Logic Tests (.slt)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant