You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Wenzhe Zhou (Jira)" <ji...@apache.org> on 2020/02/26 21:55:00 UTC
[jira] [Created] (IMPALA-9432) An "is not distinct from constant"
predicate should be converted to = in the expression rewrites
Wenzhe Zhou created IMPALA-9432:
-----------------------------------
Summary: An "is not distinct from constant" predicate should be converted to = in the expression rewrites
Key: IMPALA-9432
URL: https://issues.apache.org/jira/browse/IMPALA-9432
Project: IMPALA
Issue Type: Improvement
Components: Frontend, Planner
Affects Versions: Impala 3.3.0
Reporter: Wenzhe Zhou
In following query, "l_orderkey is not distinct from 1" should be converted as "l_orderkey = 1" in expression rewrite.
select count(*) from tpch_kudu.lineitem where l_orderkey is not distinct from 1 and l_partkey = 1 and l_suppkey = 1;
Here is the current plan.
---- PLAN
PLAN-ROOT SINK
|
01:AGGREGATE [FINALIZE]
| output: count(*)
| row-size=8B cardinality=1
|
00:SCAN KUDU [tpch_kudu.lineitem]
predicates: l_orderkey IS NOT DISTINCT FROM 1
kudu predicates: l_partkey = 1, l_suppkey = 1
row-size=8B cardinality=1
---- SCANRANGELOCATIONS
NODE 0:
ScanToken\{table-name=impala::tpch_kudu.lineitem, hash-partition-buckets: [0]}
ScanToken\{table-name=impala::tpch_kudu.lineitem, hash-partition-buckets: [1]}
ScanToken\{table-name=impala::tpch_kudu.lineitem, hash-partition-buckets: [2]}
ScanToken\{table-name=impala::tpch_kudu.lineitem, hash-partition-buckets: [3]}
ScanToken\{table-name=impala::tpch_kudu.lineitem, hash-partition-buckets: [4]}
ScanToken\{table-name=impala::tpch_kudu.lineitem, hash-partition-buckets: [5]}
ScanToken\{table-name=impala::tpch_kudu.lineitem, hash-partition-buckets: [6]}
ScanToken\{table-name=impala::tpch_kudu.lineitem, hash-partition-buckets: [7]}
ScanToken\{table-name=impala::tpch_kudu.lineitem, hash-partition-buckets: [8]}
---- DISTRIBUTEDPLAN
PLAN-ROOT SINK
|
03:AGGREGATE [FINALIZE]
| output: count:merge(*)
| row-size=8B cardinality=1
|
02:EXCHANGE [UNPARTITIONED]
|
01:AGGREGATE
| output: count(*)
| row-size=8B cardinality=1
|
00:SCAN KUDU [tpch_kudu.lineitem]
predicates: l_orderkey IS NOT DISTINCT FROM 1
kudu predicates: l_partkey = 1, l_suppkey = 1
row-size=8B cardinality=1
--
This message was sent by Atlassian Jira
(v8.3.4#803005)