Files
impala/testdata/workloads/functional-query/queries/QueryTest/explain-level1.test
xqhe c36ff0cdd7 IMPALA-10982: fix unable to explain the set operation statement
For SetOperationStmt we will replace the query statement with the
rewritten version, but we haven’t set the explain flag if the
original is explain statement.

Tests:
  -- Using impala-shell to test the explain statement of set operation.
  -- Add new test case in the explain_level tests

Change-Id: I19264dfa794ffd5ed7355acfef0ac35f17c809d3
Reviewed-on: http://gerrit.cloudera.org:8080/18179
Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
2022-02-12 06:09:59 +00:00

49 lines
1.6 KiB
Plaintext

====
---- QUERY
# Explain a simple hash join query.
explain
select *
from tpch.lineitem join tpch.orders on l_orderkey = o_orderkey;
---- RESULTS: VERIFY_IS_EQUAL
row_regex:.*Max Per-Host Resource Reservation: Memory=[0-9.]*MB Threads=[0-9]*.*
row_regex:.*Per-Host Resource Estimates: Memory=[0-9.]*MB.*
''
'PLAN-ROOT SINK'
'|'
'04:EXCHANGE [UNPARTITIONED]'
'|'
'02:HASH JOIN [INNER JOIN, BROADCAST]'
'| hash predicates: l_orderkey = o_orderkey'
'| runtime filters: RF000 <- o_orderkey'
row_regex:.*row-size=.* cardinality=.*
'|'
'|--03:EXCHANGE [BROADCAST]'
'| |'
'| 01:SCAN HDFS [tpch.orders]'
row_regex:.*partitions=1/1 files=1 size=.*
row_regex:.*row-size=.* cardinality=.*
'|'
'00:SCAN HDFS [tpch.lineitem]'
row_regex:.*partitions=1/1 files=1 size=.*
' runtime filters: RF000 -> l_orderkey'
row_regex:.*row-size=.* cardinality=.*
====
---- QUERY
# Tests the warning about missing table stats in the explain header.
explain select count(t1.int_col), avg(t2.float_col), sum(t3.bigint_col)
from functional_avro.alltypes t1
inner join functional_parquet.alltypessmall t2 on (t1.id = t2.id)
left outer join functional_avro.alltypes t3 on (t2.id = t3.id)
where t1.month = 1 and t2.year = 2009 and t3.bool_col = false
---- RESULTS: VERIFY_IS_SUBSET
'WARNING: The following tables are missing relevant table and/or column statistics.'
'functional_avro.alltypes, functional_parquet.alltypessmall'
====
---- QUERY
# Tests the set operation statement rewrite
explain select year, month from functional.alltypes
intersect
select year, month from functional.alltypes where year=2009;
---- RESULTS: VERIFY_IS_SUBSET
'04:HASH JOIN [LEFT SEMI JOIN, PARTITIONED]'
====