[ 
https://issues.apache.org/jira/browse/FLINK-34587?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Nuyanzin updated FLINK-34587:
------------------------------------
    Description: 
There is {{AVG}} function however sometimes it is required to find the most 
frequent item and {{MODE}} could be helpful to solve this

it is already supported by a number of vendors like DuckDB[1], Snowflake[2], 
Spark [3], PostgreSQL[4]

It also seems that vendors ignore {{NULL}} values and if there is no values at 
all or no not {{NULL}}  values the result will be {{NULL}}

[1] https://duckdb.org/docs/sql/aggregates.html
[2] https://docs.snowflake.com/en/sql-reference/functions/mode
[3] https://spark.apache.org/docs/latest/sql-ref-functions-builtin.html
[4] https://www.postgresql.org/docs/16/functions-aggregate.html

  was:
There is {{AVG}} function however sometimes it is required to find the most 
frequent item and {{MODE}} could be helpful to solve this

it is already supported by a number of vendors like DuckDB[1], Snowflake[2], 
Spark [3], PostgreSQL[4]

[1] https://duckdb.org/docs/sql/aggregates.html
[2] https://docs.snowflake.com/en/sql-reference/functions/mode
[3] https://spark.apache.org/docs/latest/sql-ref-functions-builtin.html
[4] https://www.postgresql.org/docs/16/functions-aggregate.html


> Support MODE aggregate function
> -------------------------------
>
>                 Key: FLINK-34587
>                 URL: https://issues.apache.org/jira/browse/FLINK-34587
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table SQL / API
>            Reporter: Sergey Nuyanzin
>            Assignee: Sergey Nuyanzin
>            Priority: Major
>
> There is {{AVG}} function however sometimes it is required to find the most 
> frequent item and {{MODE}} could be helpful to solve this
> it is already supported by a number of vendors like DuckDB[1], Snowflake[2], 
> Spark [3], PostgreSQL[4]
> It also seems that vendors ignore {{NULL}} values and if there is no values 
> at all or no not {{NULL}}  values the result will be {{NULL}}
> [1] https://duckdb.org/docs/sql/aggregates.html
> [2] https://docs.snowflake.com/en/sql-reference/functions/mode
> [3] https://spark.apache.org/docs/latest/sql-ref-functions-builtin.html
> [4] https://www.postgresql.org/docs/16/functions-aggregate.html



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to