Skip to content

[Epic] A collection of issues for extending the Aggregation function #12254

Closed

Description

@Weijun-H

Is your feature request related to a problem or challenge?

DataFusion now supports several aggregation functions, but it still lacks some common ones that are essential for a broader range of data processing tasks. To make DataFusion more versatile and capable of handling diverse workloads, it should include additional aggregation functions commonly used in data analysis, such as mode and max_by.

Describe the solution you'd like

Describe alternatives you've considered

No response

Additional context

These functions should be implemented in datafusion-contrib/datafusion-functions-extra, instead of the core

Activity

  1. changed the title [-][Epic] Extend the Aggregation function[/-] [+][Epic] A collection of issues for extending the Aggregation function[/+] on Aug 30, 2024
  2. alamb commented on Sep 5, 2024

    @alamb
    Contributor

    I wonder if we should consider where to draw the line on what aggregate functions to include in the core (i.e. should we include all these new functions?)

    Now that all aggregate functions use the same API, we could potentially keep more specialized functions such as listed here outside the ore -- either in its own crate or even own repo -- and then have other code integrate it in -- e.g. #11979

  3. alamb commented on Sep 6, 2024

    @alamb
    Contributor

    I started a discussion about if we should be adding all these functions directly in the core here: #12357

  4. Weijun-H commented on Sep 6, 2024

    @Weijun-H
    MemberAuthor

    I wonder if we should consider where to draw the line on what aggregate functions to include in the core (i.e. should we include all these new functions?)

    Now that all aggregate functions use the same API, we could potentially keep more specialized functions such as listed here outside the ore -- either in its own crate or even own repo -- and then have other code integrate it in -- e.g. #11979

    I like this idea! 🚀

  5. alamb commented on Sep 16, 2024

    @alamb
    Contributor

    @Weijun-H and @dmitrybugakov and @dharanad -- what do you think about creating a datafusion-functions-duckdb repo in datafusion-contrib similar to https://github.com/datafusion-contrib/datafusion-functions-json for JSON from @samuelcolvin and co.

    It would be a pretty neat way to help build out the function library in DataFUsion and would show off its extensibility

    I could then try an integrate it into dft that @matthewmturner and I have been working on: https://github.com/datafusion-contrib/datafusion-dft which would make it easer to use

    Originally from: #12476 (comment)

  6. austin362667 commented on Sep 16, 2024

    @austin362667
    Contributor

    Thank you @alamb for proposing this initiative. I like this idea. What about others' thought?
    It clearly draws a line between the core and the extensions. And we can still leverage those functions as extension in dft.

  7. s5dsn-eqee commented on Sep 17, 2024

    @s5dsn-eqee
    Contributor

    @alamb
    I’m generally in favor of moving additional features from the core to separate subprojects. However, could we consider using a more general name than datafusion-functions-duckdb? What are your thoughts on using something like datafusion-functions-sql or another broader name?

  8. alamb commented on Sep 17, 2024

    @alamb
    Contributor

    @alamb I’m generally in favor of moving additional features from the core to separate subprojects. However, could we consider using a more general name than datafusion-functions-duckdb? What are your thoughts on using something like datafusion-functions-sql or another broader name?

    I do not have a strong preference -- I think it likely depends on the usecase:

    • trying to migrate spark workloads
    • trying to migrate duckdb workloads
    • triynt to make the most useful sql system you can

    However, let's not let get too carried away with details at the moment.

    I created https://github.com/datafusion-contrib/datafusion-functions-extra and added @dmitrybugakov and @austin362667 as admins. If anyone else wants to help let me know and we can add you too.

    @dmitrybugakov or @austin362667 would you be willing to setup the basic skeleton of the repo?

    Perhaps you could follow the model of https://github.com/datafusion-contrib/datafusion-functions-json for readme and registration function

    And then try to put the mode function there: #12385

  9. alamb commented on Sep 17, 2024

    @alamb
    Contributor

    Update: I also added @Lordworms (a longtime DataFusion contributor) per #12284 (comment)

  10. Weijun-H commented on Sep 18, 2024

    @Weijun-H
    MemberAuthor

    @alamb I’m generally in favor of moving additional features from the core to separate subprojects. However, could we consider using a more general name than datafusion-functions-duckdb? What are your thoughts on using something like datafusion-functions-sql or another broader name?

    I do not have a strong preference -- I think it likely depends on the usecase:

    • trying to migrate spark workloads
    • trying to migrate duckdb workloads
    • triynt to make the most useful sql system you can

    However, let's not let get too carried away with details at the moment.

    I created datafusion-contrib/datafusion-functions-extra and added @dmitrybugakov and @austin362667 as admins. If anyone else wants to help let me know and we can add you too.

    @dmitrybugakov or @austin362667 would you be willing to setup the basic skeleton of the repo?

    Perhaps you could follow the model of datafusion-contrib/datafusion-functions-json for readme and registration function

    And then try to put the mode function there: #12385

    I agree that 'datafusion-functions-extra' is sufficient for the current scenario because our goal is to decouple the extra functions from the core and make them lightweight. Additionally, it would be easier to split 'datafusion-functions-extra' into many specific use cases if necessary.

  11. alamb commented on Sep 25, 2024

    @alamb
    Contributor

    I believe the consensus is that we are going to implement these functions in https://github.com/datafusion-contrib/datafusion-functions-extra -- I will close the related tickets so we are not confusing people about what we are looking for

  12. alamb commented on Sep 25, 2024

    @alamb
    Contributor

    I filed #12625 to propose moving kertosis_pop

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