Hello Aman Sinha, Csaba Ringhofer, Steve Carlin, Michael Smith, Impala Public Jenkins,
I'd like you to reexamine a change. Please visit http://gerrit.cloudera.org:8080/22815 to look at the new patch set (#4). Change subject: IMPALA-13991: Skip CROSS_JOIN rewrite if subquery is in disjunctive ...................................................................... IMPALA-13991: Skip CROSS_JOIN rewrite if subquery is in disjunctive Inside StmtRewriter.mergeExpr() there is an optimization that set JoinOperator.CROSS_JOIN under certain scenario. This patch adds criteria to SKIP that rewrite if subquery is coming from inside disjunctive expression, regardless of joinConjunct value. If joinConjunct is NOT NULL, the inlineView maybe correlated through that joinConjunct. If joinConjunct is NULL, then expr is a (NOT) EXISTS predicate. EXISTS within a disjunct is not supported yet (see IMPALA-9931). Testing: - Add planner and query test for the corner case. Before this patch, the query return wrong result. - Fixed wrong testcase in subquery-rewrite.test. Change-Id: Iac0deb0b2fb1536684cce2e004156a20b769b9ab --- M fe/src/main/java/org/apache/impala/analysis/StmtRewriter.java M testdata/workloads/functional-planner/queries/PlannerTest/nested-loop-join.test M testdata/workloads/functional-planner/queries/PlannerTest/subquery-rewrite.test M testdata/workloads/functional-query/queries/QueryTest/single-node-nlj.test 4 files changed, 70 insertions(+), 10 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/15/22815/4 -- To view, visit http://gerrit.cloudera.org:8080/22815 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iac0deb0b2fb1536684cce2e004156a20b769b9ab Gerrit-Change-Number: 22815 Gerrit-PatchSet: 4 Gerrit-Owner: Riza Suminto <riza.sumi...@cloudera.com> Gerrit-Reviewer: Aman Sinha <amsi...@cloudera.com> Gerrit-Reviewer: Csaba Ringhofer <csringho...@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Michael Smith <michael.sm...@cloudera.com> Gerrit-Reviewer: Riza Suminto <riza.sumi...@cloudera.com> Gerrit-Reviewer: Steve Carlin <scar...@cloudera.com>