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

make udf structs public #9900

Closed
Tracked by #9904
universalmind303 opened this issue Apr 1, 2024 · 2 comments · Fixed by #9903
Closed
Tracked by #9904

make udf structs public #9900

universalmind303 opened this issue Apr 1, 2024 · 2 comments · Fixed by #9903
Labels
enhancement New feature or request

Comments

@universalmind303
Copy link
Contributor

Is your feature request related to a problem or challenge?

Datafusion 36 changed a lot of the builtinfunction stuff, mainly to make it more modular for which functions you want to register, while this is great, it does impose some limitations on end users.

For example in GlareDB, we build out a catalog entry for each of the datafusion functions. (a trait that provides some additional functionality on top of what's provided by datafusion).

trait CatalogEntry {
    const NAME: &'static str;
    const DESCRIPTION: &'static str;
    const EXAMPLE: &'static str;
    const FUNCTION_TYPE: FunctionType = FunctionType::Scalar;
}

Currently (datafusion 35) we just create a new struct similar to what is already done in the datafusion/functions crate, but to reduce duplicated code, we'd like to just implement it directly on the structs

impl CatalogEntry for ArrayToString {
// ...
}

Describe the solution you'd like

all function structs in datafusion/functions and datafusion/functions-array are public.

Describe alternatives you've considered

No response

Additional context

No response

@universalmind303 universalmind303 added the enhancement New feature or request label Apr 1, 2024
@universalmind303
Copy link
Contributor Author

@alamb, considering the low effort involved in implementing, would it be possible to include this in 37?

@alamb
Copy link
Contributor

alamb commented Apr 1, 2024

@alamb, considering the low effort involved in implementing, would it be possible to include this in 37?

I think this is unlikely to make 37.0.0 as we are already on RC2 -- Let's dicsuss that request on #9682

However, I would be open to creating a 37.1.0 release with this change and potentially other non breaking API changes.

Update: I filed #9904 to track the idea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants