You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECT col_1, col_2, LAG(col_2,2,col_1) OVER (ORDER BY col_1)
FROM test_tbl ORDER BY col_1;
`
Describe the solution you'd like
The third parameter of LAG supports fields of the same type.
fix 'The default parameter (parameter 3) of LAG must be a constant', 'The type of the third parameter of LEAD/LAG not match the type DATE' error Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered:
Feature request
Is your feature request related to a problem? Please describe.
`
CREATE TABLE test_tbl (col_1 INT, col_2 INT)
DISTRIBUTED BY HASH(col_1);
INSERT INTO test_tbl VALUES
(1, NULL),
(2, 4),
(3, NULL),
(4, 2),
(5, NULL),
(6, 7),
(7, 6),
(8, 5),
(9, NULL),
(10, NULL);
SELECT col_1, col_2, LAG(col_2,2,col_1) OVER (ORDER BY col_1)
FROM test_tbl ORDER BY col_1;
`
Describe the solution you'd like
The third parameter of LAG supports fields of the same type.
fix 'The default parameter (parameter 3) of LAG must be a constant', 'The type of the third parameter of LEAD/LAG not match the type DATE' error
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: