Skip to content

Perform type coercion for corr aggregate function during physical planning #15776

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kumarlokesh
Copy link
Contributor

Which issue does this PR close?

Rationale for this change

What changes are included in this PR?

  • Created a new utility function apply_aggregate_coercion that applies type
    coercion during physical planning based on the logical type coercion rules
  • Modified the physical planner to use this utility when creating aggregate expressions
  • Removed explicit type casting from the CorrelationGroupsAccumulator.update_batch method

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added logical-expr Logical plan and expressions physical-expr Changes to the physical-expr crates core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) functions Changes to functions implementation labels Apr 19, 2025
@kumarlokesh kumarlokesh force-pushed the avoid-explicit-cast-in-corr-aggregate-fn branch from 41587c4 to 1933efe Compare April 19, 2025 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core DataFusion crate functions Changes to functions implementation logical-expr Logical plan and expressions physical-expr Changes to the physical-expr crates sqllogictest SQL Logic Tests (.slt)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avoid explicit cast during execution in corr aggregate function
1 participant