[
https://issues.apache.org/jira/browse/IMPALA-13540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17900401#comment-17900401
]
ASF subversion and git services commented on IMPALA-13540:
----------------------------------------------------------
Commit 265479f068ffc39342205fb6fa6fc403bcfea6e5 in impala's branch
refs/heads/master from Steve Carlin
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=265479f06 ]
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]>
> Calcite planner: wrong results when intersect mixed with union
> --------------------------------------------------------------
>
> Key: IMPALA-13540
> URL: https://issues.apache.org/jira/browse/IMPALA-13540
> Project: IMPALA
> Issue Type: Sub-task
> Reporter: Steve Carlin
> Priority: Major
>
> The following query returns the wrong result:
> select 100 intersect select 101 union select 101
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]