mirror of
https://github.com/apache/impala.git
synced 2026-02-02 06:00:36 -05:00
IMPALA-11323: Don't evaluate constants-only inferred predicates
IMPALA-10182 fixed the problem of creating inferred predicates when both sides of an equality predicate came from the same slot. Inferred predicates also should not be created when both sides of an equality predicate are constant values which do not have scan slots. Change-Id: If1cd4559dda406d2d38703ed594b70b41ed336fd Reviewed-on: http://gerrit.cloudera.org:8080/18579 Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Reviewed-by: Aman Sinha <amsinha@cloudera.com>
This commit is contained in:
@@ -578,4 +578,18 @@ NULL,NULL
|
||||
NULL,NULL
|
||||
---- TYPES
|
||||
INT, INT
|
||||
====
|
||||
====
|
||||
---- QUERY
|
||||
# IMPALA-11323: Constant expressions should get filtered out so they
|
||||
# don't get placed in the select node in the planner.
|
||||
with t as (select 1 a), v as
|
||||
(select distinct a, cast(null as smallint) b, cast(null as smallint) c from t)
|
||||
select distinct a,b,c from v
|
||||
union all
|
||||
select distinct a,b,c from v;
|
||||
---- RESULTS
|
||||
1,NULL,NULL
|
||||
1,NULL,NULL
|
||||
---- TYPES
|
||||
TINYINT, SMALLINT, SMALLINT
|
||||
====
|
||||
|
||||
Reference in New Issue
Block a user