Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Cannot Reproduce
-
Impala 2.3.0
-
None
Description
Impala Query:
SELECT
LAG('644', 66) OVER (ORDER BY string_col ASC, tinyint_col) AS char_col,
LAG(COALESCE(306, -86, -391), 77) OVER (ORDER BY month ASC, smallint_col DESC) AS int_col
FROM alltypesagg
order by char_col desc, int_col desc
limit 15;
Equivalent Postgres Query:
SELECT
LAG('644' || '', 66) OVER (ORDER BY CAST(string_col AS BYTEA) ASC, tinyint_col) AS char_col,
LAG(COALESCE(306, -86, -391), 77) OVER (ORDER BY month ASC, smallint_col DESC) AS int_col
FROM alltypesagg
order by char_col desc, int_col desc
limit 15;
Impala Result:
+----------+---------+ | char_col | int_col | +----------+---------+ | NULL | NULL | | NULL | NULL | | NULL | NULL | | NULL | NULL | | NULL | NULL | | NULL | NULL | | NULL | NULL | | NULL | NULL | | NULL | NULL | | NULL | NULL | | NULL | NULL | | NULL | NULL | | NULL | NULL | | NULL | 306 | | NULL | 306 | +----------+---------+ Fetched 15 row(s) in 0.84s
Postgres Result:
char_col | int_col ----------+--------- | | | | | | | | | | | | | 306 | 306 | 306 (15 rows)