Skip to content

Conversation

@vibhatha
Copy link
Contributor

@vibhatha vibhatha commented Oct 4, 2022

This PR includes a modification to the function registry usage in existing UDF implementation. This allows users to create functions in a given function registry by leveraging the nested function registry approach introduced before. This provides the ability to isolate a group of functions for a defined registry. When functions needs to be removed, deleting the registry including those functions would remove the functions too.

This is not exactly unregistering functions, but a different approach which serves the same purpose.

@vibhatha vibhatha marked this pull request as draft October 4, 2022 11:13
@github-actions
Copy link

github-actions bot commented Oct 4, 2022

@github-actions
Copy link

github-actions bot commented Oct 4, 2022

⚠️ Ticket has not been started in JIRA, please click 'Start Progress'.

@vibhatha vibhatha marked this pull request as ready for review October 4, 2022 11:19
@vibhatha vibhatha marked this pull request as draft October 4, 2022 12:36
@jorisvandenbossche
Copy link
Member

How does Arrow (c++) decide which function registry to look into? And in which order in case there would be conflicting names?

Checking the code, it seems that pc.call_function(..) also only looks in the default, global function registry. So in practice, how useful is it that you can register a UDF in another registry? How does this then actually get used? (how do you call it manually with pc.call_function(..), how does it get resolved if you reference this kernel in a projection or query?)

@vibhatha
Copy link
Contributor Author

vibhatha commented Oct 5, 2022

How does Arrow (c++) decide which function registry to look into? And in which order in case there would be conflicting names?

The created registry on Python is passed into the C++ when we register the function. It is added as an option.

Checking the code, it seems that pc.call_function(..) also only looks in the default, global function registry. So in practice, how useful is it that you can register a UDF in another registry? How does this then actually get used? (how do you call it manually with pc.call_function(..), how does it get resolved if you reference this kernel in a projection or query?)

I agree with this restriction. I kept this in draft as this part is not yet clear or the choice we have to make when using this.
Also @jorisvandenbossche this was implemented as part of a discussion went on the JIRA itself.

cc @westonpace to gather more thoughts about the usage in Acero, etc.

@vibhatha vibhatha marked this pull request as ready for review October 11, 2022 10:27
@amol-
Copy link
Member

amol- commented Mar 30, 2023

Closing because it has been untouched for a while, in case it's still relevant feel free to reopen and move it forward 👍

@amol- amol- closed this Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants