IMPALA-1524: Materialize all tuples produced by an EmptySetNode.

Change-Id: I3b151ace464c67634104f84f7223c948fed8909e
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/5406
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Tested-by: jenkins
(cherry picked from commit c2959485a066b5c0b40e8b0790d526726236d0c9)
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/5409
Reviewed-by: Nong Li <nong@cloudera.com>
Tested-by: Nong Li <nong@cloudera.com>
This commit is contained in:
Alex Behm
2014-11-24 17:01:59 -08:00
committed by Nong Li
parent dd89c1455a
commit 4ad15bb2be
3 changed files with 24 additions and 7 deletions

View File

@@ -98,3 +98,22 @@ select MIN(int_col) OVER () FROM alltypes limit 0
---- TYPES
INT
====
---- QUERY
# IMPALA-1524: Materialize all tuples produced by an EmptySet node.
SELECT
COALESCE(580, MAX(t2.year), 150) AS int_col FROM (
SELECT
t1.bool_col,
COALESCE(LAG(-826, 69) OVER (
ORDER BY t1.bool_col DESC, COALESCE(t2.int_col, t2.smallint_col, t2.id)), 279, -764) AS int_col,
COALESCE(t2.int_col, t2.smallint_col, t2.id) AS int_col_2
FROM functional.alltypestiny t1
INNER JOIN functional.alltypestiny t2
ON ((t2.bigint_col) = (t1.id)) AND ((t2.timestamp_col) = (t1.timestamp_col))) t1
INNER JOIN functional.alltypes t2 ON (t2.year) = (t1.int_col_2)
WHERE (-339.22) IN (-922.68, -254.84)
---- RESULTS
580
---- TYPES
INT
====