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

refactor: use a common macro to define math UDFs #9598

Merged
merged 6 commits into from
Mar 13, 2024

Conversation

jonahgao
Copy link
Member

@jonahgao jonahgao commented Mar 13, 2024

Which issue does this PR close?

Closes #9552.

Rationale for this change

Use a common macro to define unary math UDFs, aiming to reduce code duplication and facilitate subsequent porting.
These functions include
https://github.com/apache/arrow-datafusion/blob/0302d6530a5a7fffe7da40e0f3b13794a9c693ff/datafusion/physical-expr/src/math_expressions.rs#L158-L178

What changes are included in this PR?

Are these changes tested?

Yes. By existing tests.

Are there any user-facing changes?

No

@jonahgao jonahgao marked this pull request as draft March 13, 2024 14:26
@jonahgao jonahgao marked this pull request as ready for review March 13, 2024 15:13
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.

👨‍🍳 👌

Very nice @jonahgao

@alamb
Copy link
Contributor

alamb commented Mar 13, 2024

This is a really nice design

Copy link
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

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

Thanks @jonahgao
nice change

@jonahgao
Copy link
Member Author

Thank you for the review! @alamb @comphead

Copy link
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

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

lgtm thanks @jonahgao

@alamb alamb merged commit 60f6514 into apache:main Mar 13, 2024
23 checks passed
@alamb
Copy link
Contributor

alamb commented Mar 13, 2024

Merging to get this (good) new pattern estabilished before too many other functions get ported

@jonahgao jonahgao deleted the math_macro branch March 14, 2024 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Eliminate code duplication between math UDFs
3 participants