You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Nico Kruber (Jira)" <ji...@apache.org> on 2021/04/22 08:00:00 UTC
[jira] [Created] (FLINK-22405) Support fixed-lengh chars in the
LeadLag built-in function
Nico Kruber created FLINK-22405:
-----------------------------------
Summary: 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
Reporter: Nico Kruber
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', 'alice@test.com', ARRAY [ 'alice@test.com' ], 'Test Ltd'),
('Alice', 'alice@test.com', ARRAY [ 'alice@test.com' ], 'Test Ltd'),
('Alice', 'alice@test2.com', ARRAY [ 'alice@test.com', 'alice@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}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)