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 (#3).

Change subject: IMPALA-13991: Skip CROSS_JOIN rewrite if subquery in disjuctive 
expr
......................................................................

IMPALA-13991: Skip CROSS_JOIN rewrite if subquery in disjuctive expr

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 disjuctive
expression and joinConjunct is not null (onClauseConjuncts is not
empty). In that case, the joinConjunct might come from the inlineView,
making the inlineView correlated with TableRef from the left hand side
of join.

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, 71 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/15/22815/3
--
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: 3
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>

Reply via email to