Skip to content

make udf structs public #9900

Closed
Closed

Description

@universalmind303

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

Activity

  1. universalmind303 commented on Apr 1, 2024

    @universalmind303
    ContributorAuthor

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

  2. alamb commented on Apr 1, 2024

    @alamb
    Contributor

    @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions