Skip to content

Add array_min function support #14416

Closed as duplicate
Closed as duplicate

Description

@erenavsarogullari

Is your feature request related to a problem or challenge?

Currently, Spark, Snowflake and Presto support array_min function. This can also be useful for DataFusion.

array_min(make_array(3,1,4,2)) => 1
array_min(make_array('h','e','l','l',NULL,'o')) => e
array_min(make_array(NULL,NULL)) => NULL

Spark: https://docs.databricks.com/en/sql/language-manual/functions/array_min.html
Snowflake: https://docs.snowflake.com/en/sql-reference/functions/array_min
Presto: https://prestodb.io/docs/current/functions/array.html#array_min-x-x

Describe the solution you'd like

Adding array_min function support to DataFusion.

Describe alternatives you've considered

No response

Additional context

No response

Activity

  1. erenavsarogullari commented on Feb 3, 2025

    @erenavsarogullari
    MemberAuthor

    take

  2. Omega359 commented on Feb 3, 2025

    @Omega359
    Contributor

    Possibly related/tangential: #14392

  3. erenavsarogullari commented on Feb 3, 2025

    @erenavsarogullari
    MemberAuthor

    @Omega359 Thanks for the comment. Yes, this effort is also related with #14392.
    I think we have 2 use cases for array_min & array_max functions (and i think this also common requirement for other SQL functions.). They are required for DataFusion end-users (not using Comet) and Comet support is another use-case because Spark supports them natively and DataFusion has not supported yet. We will also need for the mapping on Comet side for Spark queries using this scalar array functions submitted to DataFusion by Comet.

  4. changed the title [-]Add array_min function support[/-] [+]Add `array_min` function support[/+] on Feb 4, 2025
  5. Jefffrey commented on Sep 27, 2025

    @Jefffrey
    Contributor

    Implemented by #16574

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

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