Impala Public Jenkins has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/17610 )

Change subject: IMPALA-9338 Fix impala crashing in 
impala::RowDescriptor::TupleIsNullable(int)
......................................................................

IMPALA-9338 Fix impala crashing in impala::RowDescriptor::TupleIsNullable(int)

The patch fixes a bug in the function of orderConjunctsByCost, which
could remove the wrong object in the list when the first conjunct is
not the best and there is a same conjunct with different letter cases.
It could end up to have duplicate objects after reordering the list
because the conjunct, which has been added to the return list, is
still in the remaining list, and lead to a wrong plan later where
each side of the JOIN references columns from the other side due to
a double flip on a same conjunct (There are two conjuncts in the list,
and they are flipped as required by the analyzer, but unfortunately,
the two conjuncts are the same object).

The root cause of the issue is that some parts of the analyzer are
case-sensitive, but some parts are not. For example, the remove() of
the List considers the conjuncts with different letter cases are the
same because they refer the same columns, while the compareTo()
of the String considers the letter cases. This discrepancy creates
some unexpected bugs.

The fix uses the index instead of the Object to remove in the
remaining list to solve the bug. However, there may still be
somewhere else in our code that has similar issues regarding to
different letter cases, it could be better that we have a consistent
policy in SQL analyzing to avoid such bugs.

Regression testcases has been added to queries/tpch-outer-joins and
PlannerTest/join-order.

Tests:
Ran the Core FE_TEST and EE_TEST.
Passed the regression test in tpch-outer-joins and
PlannerTest/join-order.

Change-Id: I2ba031d7a6eda21a77b0e53bc41772ee9e00a528
Reviewed-on: http://gerrit.cloudera.org:8080/17610
Reviewed-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
---
M fe/src/main/java/org/apache/impala/planner/PlanNode.java
M testdata/workloads/functional-planner/queries/PlannerTest/join-order.test
M testdata/workloads/tpch/queries/tpch-outer-joins.test
3 files changed, 80 insertions(+), 3 deletions(-)

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

--
To view, visit http://gerrit.cloudera.org:8080/17610
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I2ba031d7a6eda21a77b0e53bc41772ee9e00a528
Gerrit-Change-Number: 17610
Gerrit-PatchSet: 7
Gerrit-Owner: Yida Wu <wydbaggio...@gmail.com>
Gerrit-Reviewer: Abhishek Rawat <ara...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Gerrit-Reviewer: Qifan Chen <qc...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <huangquanl...@gmail.com>
Gerrit-Reviewer: Yida Wu <wydbaggio...@gmail.com>

Reply via email to