Details
-
Bug
-
Status: Resolved
-
Blocker
-
Resolution: Not A Bug
-
Impala 2.5.0
-
None
-
DB: functional
Description
The following query returns 1000 rows with no NULLS.
Query:
SELECT COALESCE( LEAD('251', 70) OVER (ORDER BY a3.smallint_col DESC, a3.int_col DESC), LEAD('168', 64) OVER (ORDER BY a3.smallint_col DESC, a4.double_col ASC) ) AS char_col FROM alltypes a3 INNER JOIN alltypesagg a4 ON ((a4.date_string_col) = (a3.date_string_col)) AND ((a4.day) = (a3.bigint_col))
However the following 2 queries, which are subsets return NULLS.
SELECT
LEAD('251', 70) OVER (ORDER BY a3.smallint_col DESC, a3.int_col DESC)
FROM
alltypes a3
INNER JOIN alltypesagg a4 ON ((a4.date_string_col) = (a3.date_string_col)) AND ((a4.day) = (a3.bigint_col))
SELECT
LEAD('168', 64) OVER (ORDER BY a3.smallint_col DESC, a4.double_col ASC)
FROM
alltypes a3
INNER JOIN alltypesagg a4 ON ((a4.date_string_col) = (a3.date_string_col)) AND ((a4.day) = (a3.bigint_col))
Also when the original query is executed in Postgres, some NULLS are returned.