Steve Carlin has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/22052


Change subject: IMPALA-13540: Calcite planner: fix wrong results for set 
operators
......................................................................

IMPALA-13540: Calcite planner: fix wrong results for set operators

Calcite treats the intersect set operator with higher precedence
when compared with the except and union set operators. Impala treats
all the precedences equally (favoring left operators over right).

The following query was failing
select 100 union select 101 intersect select 101

Calcite was returning 2 results here, performing the intersect before
the union. Impala does the union first and returned one result.

To fix this, new custom operators were created for the set operators
where all set operators have equal precedence.

Change-Id: Ic52661a30cc90534ea1a20868799edf9ceed13b6
---
M java/calcite-planner/src/main/codegen/templates/Parser.jj
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/ImpalaCustomOperatorTable.java
2 files changed, 31 insertions(+), 9 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/52/22052/1
--
To view, visit http://gerrit.cloudera.org:8080/22052
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic52661a30cc90534ea1a20868799edf9ceed13b6
Gerrit-Change-Number: 22052
Gerrit-PatchSet: 1
Gerrit-Owner: Steve Carlin <[email protected]>

Reply via email to