Skip to content

Conversation

@Michael-J-Ward
Copy link
Contributor

@Michael-J-Ward Michael-J-Ward commented Oct 11, 2024

Rationale for this change

make_scalar_function has been deprecated since v36. It is being removed from the public api in v43.

What changes are included in this PR?

datafusion already provides utilities for converting ColumnarValue to and from ArrayRef, so I simply used those to convert the input and output into what ScalarUDF requires.

Are there any user-facing changes?

No.

Additional Context

It may be useful to review how upstream previously converted functions that use ArrayRef to ScalarUDF.

https://github.com/apache/datafusion/blob/8e8bb89a285c6fe6e8186378b7798d3d213f08f7/datafusion/physical-expr/src/functions.rs#L79-L122

`make_scalar_function` has been deprecated since v36 [0].
It is being removed from the public api in v43 [1].

[0]: apache/datafusion#8878
[1]: apache/datafusion#12505
Copy link
Member

@timsaucer timsaucer left a comment

Choose a reason for hiding this comment

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

This looks great! Thank you for doing it!

@timsaucer timsaucer merged commit 840b5de into apache:main Oct 14, 2024
15 checks passed
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.

2 participants