IMPALA-2147: Support IS [NOT] DISTINCT FROM and "<=>" predicates

Enforces that the planner treats IS NOT DISTINCT FROM as eligible for
hash joins, but does not find the minimum spanning tree of
equivalences for use in optimizing query plans; this is left as future
work.

Change-Id: I62c5300b1fbd764796116f95efe36573eed4c8d0
Reviewed-on: http://gerrit.cloudera.org:8080/710
Reviewed-by: Jim Apple <jbapple@cloudera.com>
Tested-by: Internal Jenkins
This commit is contained in:
Jim Apple
2015-08-26 20:18:26 -07:00
committed by Internal Jenkins
parent 022403bffc
commit 1a3d7ffd4f
40 changed files with 1365 additions and 145 deletions

View File

@@ -2338,3 +2338,61 @@ select regexp_match_count(tmp.str, tmp.pattern, tmp.start_pos, tmp.params) from
('iPhone\niPad\niPod', '^I.*$', 1, 'imn')) as tmp
---- CATCH
Illegal match parameter x
====
---- QUERY
# IMPALA-2147: IS [NOT] DISTINCT FROM and "<=>"
select NULL <=> NULL
---- RESULTS
true
---- TYPES
BOOLEAN
====
---- QUERY
select NULL <=> 1
---- RESULTS
false
---- TYPES
BOOLEAN
====
---- QUERY
select NULL <=> "foo"
---- RESULTS
false
---- TYPES
BOOLEAN
====
---- QUERY
select NULL IS DISTINCT FROM NULL
---- RESULTS
false
---- TYPES
BOOLEAN
====
---- QUERY
select NULL IS DISTINCT FROM 3.14
---- RESULTS
true
---- TYPES
BOOLEAN
====
---- QUERY
select cast(0 as bigint) IS DISTINCT FROM NULL
---- RESULTS
true
---- TYPES
BOOLEAN
====
---- QUERY
select 2.78 IS DISTINCT FROM 3.14
---- RESULTS
true
---- TYPES
BOOLEAN
====
---- QUERY
select 2.78 IS NOT DISTINCT FROM 3.14
---- RESULTS
false
---- TYPES
BOOLEAN
====