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

AggregateUDFImpl::schema_name and AggregateUDFImpl::display_name for customizable name #14695

Merged
merged 9 commits into from
Feb 17, 2025

Conversation

jayzhan211
Copy link
Contributor

Which issue does this PR close?

  • Closes #.

Rationale for this change

Similar to ScalarFunction, we can modify the schema name to the one we want.
We need this for #14689

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added sql SQL Planner logical-expr Logical plan and expressions optimizer Optimizer rules core Core DataFusion crate labels Feb 16, 2025
@github-actions github-actions bot added the proto Related to proto crate label Feb 16, 2025
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.

Thanks @jayzhan211 -- this makes sense to me

if let Some(null_treatment) = null_treatment {
write!(f, " {}", null_treatment)?;
Expr::AggregateFunction(AggregateFunction { func, params }) => {
match func.schema_name(params) {
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@alamb alamb mentioned this pull request Feb 16, 2025
@jayzhan211 jayzhan211 changed the title AggregateUDFImpl::schema_name for customizable schema name AggregateUDFImpl::schema_name and AggregateUDFImpl::display_name for customizable name Feb 17, 2025
@jayzhan211
Copy link
Contributor Author

Add display name as well

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.

Looks great -- thanks @jayzhan211

@alamb alamb merged commit ece4555 into apache:main Feb 17, 2025
24 checks passed
@jayzhan211
Copy link
Contributor Author

Thanks @alamb

@jayzhan211 jayzhan211 deleted the shema_name_udaf branch February 17, 2025 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core DataFusion crate logical-expr Logical plan and expressions optimizer Optimizer rules proto Related to proto crate sql SQL Planner substrait
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants