Paul Rogers created IMPALA-8031:
-----------------------------------
Summary: Remove redundant inequalities for selectivity calcs
Key: IMPALA-8031
URL: https://issues.apache.org/jira/browse/IMPALA-8031
Project: IMPALA
Issue Type: Improvement
Components: Frontend
Affects Versions: Impala 3.1.0
Reporter: Paul Rogers
Assignee: Paul Rogers
If a query has two inequalities on the same column, and they are of the same
“direction”, then only the one with the larger (or smaller) applies.
Selectivity estimates should reflect this fact.
{noformat}
select *
from tpch.customer c
where c.c_custkey < 1234
and c.c_custkey < 2345
---- PLAN
PLAN-ROOT SINK
|
00:SCAN HDFS [tpch.customer c]
partitions=1/1 files=1 size=23.08MB row-size=218B cardinality=28.44K
predicates: c.c_custkey < 1234, c.c_custkey < 2345
{noformat}
Expected:
{noformat}
00:SCAN HDFS [tpch.customer c]
partitions=1/1 files=1 size=23.08MB row-size=218B cardinality=49.50K
{noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]