Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.12.2, 1.13.0
Description
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:
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 );
SELECT name, LEAD(company, 0) AS company FROM test_cardinality WHERE CARDINALITY(aliases) >= 2 GROUP BY name;
Attachments
Issue Links
- links to