Alex Behm has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/5404

Change subject: IMPALA-4614: Set eval cost of timestamp literals.
......................................................................

IMPALA-4614: Set eval cost of timestamp literals.

The main isuse was that the eval cost was not set for
timestamp literals, so a preconditions check was hit
when trying to order a list of conjuncts by cost.

Another subtle issue made the bug only reproducible by
a specific query against a Kudu table: The eval cost
of Exprs was not recomputed in analyze(), even after
resetting an Expr, e.g., during a substitution. As a
result, the bug was only reproducible for a list
of conjuncts that contained an inferred predicate
with a timestamp literal. The fix is to always set
the eval cost during Expr.analyze(), even if the
eval cost is unknown (-1). After this fix, the
original issue is also reproducible on other queries
and non-Kudu tables.

Testing: Ran planner tests locally. Ran query_test.py
locally. A private core/hdfs run passed.

Change-Id: Ife30420bafbd1c64a5e3385e5755909110b4b354
---
M fe/src/main/java/org/apache/impala/analysis/ArithmeticExpr.java
M fe/src/main/java/org/apache/impala/analysis/BinaryPredicate.java
M fe/src/main/java/org/apache/impala/analysis/CompoundPredicate.java
M fe/src/main/java/org/apache/impala/analysis/FunctionCallExpr.java
M fe/src/main/java/org/apache/impala/analysis/InPredicate.java
M fe/src/main/java/org/apache/impala/analysis/LikePredicate.java
M fe/src/main/java/org/apache/impala/analysis/TimestampArithmeticExpr.java
M fe/src/main/java/org/apache/impala/analysis/TimestampLiteral.java
M 
testdata/workloads/functional-planner/queries/PlannerTest/conjunct-ordering.test
9 files changed, 50 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/04/5404/1
-- 
To view, visit http://gerrit.cloudera.org:8080/5404
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ife30420bafbd1c64a5e3385e5755909110b4b354
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Alex Behm <[email protected]>

Reply via email to