[
https://issues.apache.org/jira/browse/FLINK-22405?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Till Rohrmann updated FLINK-22405:
----------------------------------
Summary: Support fixed-length chars in the LeadLag built-in function (was:
Support fixed-lengh chars in the LeadLag built-in function)
> Support fixed-length 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', '[email protected]', ARRAY [ '[email protected]' ], 'Test Ltd'),
> ('Alice', '[email protected]', ARRAY [ '[email protected]' ], 'Test Ltd'),
> ('Alice', '[email protected]', ARRAY [ '[email protected]', '[email protected]' ],
> '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)