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

Nico Kruber reassigned FLINK-22405:
-----------------------------------

    Assignee: liwei li

> Support fixed-lengh chars in the LeadLag built-in function
> ----------------------------------------------------------
>
>                 Key: FLINK-22405
>                 URL: https://issues.apache.org/jira/browse/FLINK-22405
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table SQL / API
>    Affects Versions: 1.12.2, 1.13.0
>            Reporter: Nico Kruber
>            Assignee: liwei li
>            Priority: Minor
>              Labels: auto-deprioritized-major, pull-request-available, starter
>
> LeadLag aggregate function does not support type: ''CHAR'', as in the 
> following example (a CAST to VARCHAR works around this). Technically, there 
> should be no reason though to support STRING/VARCHAR but not CHAR:
> {code:sql}
> CREATE TEMPORARY VIEW test_cardinality AS
> SELECT * FROM ( VALUES
>   ('Alice', 'al...@test.com', ARRAY [ 'al...@test.com' ], 'Test Ltd'),
>   ('Alice', 'al...@test.com', ARRAY [ 'al...@test.com' ], 'Test Ltd'),
>   ('Alice', 'al...@test2.com', ARRAY [ 'al...@test.com', 'al...@test2.com' ], 
> 'Test Ltd'))
> AS t ( name, email, aliases, company );
> {code}
> {code:sql}
> SELECT
>   name,
>   LEAD(company, 0) AS company
> FROM test_cardinality
> WHERE CARDINALITY(aliases) >= 2
> GROUP BY name;
> {code}
> -> see 
> https://github.com/apache/flink/blob/release-1.13.0-rc1/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/utils/AggFunctionFactory.scala#L331



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to