Bikramjeet Vig has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/8660


Change subject: IMPALA-5929: Remove redundant explicit casts to string
......................................................................

IMPALA-5929: Remove redundant explicit casts to string

This patch adds a query rewriter to remove redundant explicit casts to
string from binary predicates of the form:
"cast(<non-const expr> to string) <eq/ne op> <string constant>".
The cast is redundant if the predicate evaluation is the same even if
the cast is removed and the constant is converted to the original type
of the expression. For example:
cast(int_col as string) = '123456' -> int_col = 123456

Testing:
- Added unit tests to ExprRewriteRulesTest
- Added functional test to expr.test
- Current FE planner tests and BE expr-test run successfully with this
change.

Change-Id: I91b7c6452d0693115f9b9ed9ba09f3ffe0f36b2b
---
M fe/src/main/java/org/apache/impala/analysis/Analyzer.java
A fe/src/main/java/org/apache/impala/rewrite/RemoveRedundantStringCast.java
M fe/src/test/java/org/apache/impala/analysis/ExprRewriteRulesTest.java
M testdata/workloads/functional-query/queries/QueryTest/exprs.test
4 files changed, 157 insertions(+), 0 deletions(-)



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I91b7c6452d0693115f9b9ed9ba09f3ffe0f36b2b
Gerrit-Change-Number: 8660
Gerrit-PatchSet: 1
Gerrit-Owner: Bikramjeet Vig <bikramjeet....@cloudera.com>

Reply via email to