Michael Smith has submitted this change and it was merged. ( 
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 rows here, performing the intersect before
the union. Impala does the union first and returned one row.

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

Change-Id: Ic52661a30cc90534ea1a20868799edf9ceed13b6
Reviewed-on: http://gerrit.cloudera.org:8080/22052
Reviewed-by: Michael Smith <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
---
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, 32 insertions(+), 9 deletions(-)

Approvals:
  Michael Smith: Looks good to me, approved
  Impala Public Jenkins: Verified

--
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: merged
Gerrit-Change-Id: Ic52661a30cc90534ea1a20868799edf9ceed13b6
Gerrit-Change-Number: 22052
Gerrit-PatchSet: 7
Gerrit-Owner: Steve Carlin <[email protected]>
Gerrit-Reviewer: Aman Sinha <[email protected]>
Gerrit-Reviewer: Anonymous Coward (816)
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Steve Carlin <[email protected]>

Reply via email to