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

Remove Arc wrapping from create_udf's return_type #12489

Conversation

findepi
Copy link
Member

@findepi findepi commented Sep 16, 2024

The argument types are moved into create_udf so moving also return_type would increase API consistency.

Internally, the create_udf unwrapped or cloned (so moves) the passed in return type Arc, so there was no non-API benefit from using a shared pointer.

The argument types are moved into `create_udf` so moving also
`return_type` would increase API consistency.

Internally, the `create_udf` unwrapped or cloned (so moves) the passed in
return type Arc, so there was no non-API benefit from using a shared
pointer.
@github-actions github-actions bot added logical-expr Logical plan and expressions core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) proto Related to proto crate labels Sep 16, 2024
@alamb alamb added the api change Changes the API exposed to users of the crate label Sep 16, 2024
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.

Thank you for this cleanup @findepi

I think this Arc wrapping is left over from a long time ago and I agree is inconsistent with the rest of the DataFusion codebase's use of DataType

@alamb
Copy link
Contributor

alamb commented Sep 17, 2024

🚀

@alamb alamb merged commit 0a64f34 into apache:main Sep 17, 2024
24 checks passed
@findepi findepi deleted the findepi/remove-arc-wrapping-from-create-udf-s-return-type-a5c002 branch September 17, 2024 18:47
Michael-J-Ward added a commit to Michael-J-Ward/datafusion-python that referenced this pull request Oct 15, 2024
Michael-J-Ward added a commit to Michael-J-Ward/datafusion-python that referenced this pull request Oct 28, 2024
Michael-J-Ward added a commit to apache/datafusion-python that referenced this pull request Nov 10, 2024
* patch datafusion deps

* migrate from deprecated RuntimeEnv::new to RuntimeEnv::try_new

Ref: apache/datafusion#12566

* remove Arc from create_udf call

Ref: apache/datafusion#12489

* doc typo

* migrage new UnnestOptions API

Ref: https://github.com/apache/datafusion/pull/12836/files

* update API for logical expr Limit

Ref: apache/datafusion#12836

* remove logical expr CrossJoin

It was removed upstream.

Ref: apache/datafusion#13076

* update PyWindowUDF

Ref: apache/datafusion#12803

* migrate window functions lead and lag to udwf

Ref: apache/datafusion#12802

* migrate window functions rank, dense_rank, and percent_rank to udwf

Ref: apache/datafusion#12648

* convert window function cume_dist to udwf

Ref: apache/datafusion#12695

* convert window function ntile to udwf

Ref: apache/datafusion#12694

* clean up functions_window invocation

* Only one column was being passed to udwf

* Update to DF 43.0.0

* Update tests to look for string_view type

* String view is now the default type for strings

* Making a variety of adjustments in wrappers and unit tests to account for the switch from string to string_view as default

* Resolve errors in doc building

---------

Co-authored-by: Tim Saucer <timsaucer@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api change Changes the API exposed to users of the crate core Core DataFusion crate logical-expr Logical plan and expressions proto Related to proto crate sqllogictest SQL Logic Tests (.slt)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants