wangsheng has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/17930


Change subject: IMPALA-10836: Add 'CastExprSimplifyRule' rule to rewrite cast 
expr in some situations
......................................................................

IMPALA-10836: Add 'CastExprSimplifyRule' rule to rewrite cast expr in some 
situations

This patch add a new expr rewrite rule to simplify some cast expr in
two situations:
1.When cast target data type is same as column data type.
2.When inner cast target data type is same as outer cast target data
type.
We will remove unnecessary cast expr if matched rule. This kind of
rewrite will improve query performance when cast a non-partition column.
Especially when scan lots of data. Besides, cast expr in where clause
can not pushdown to Kudu server, if we can remove unnecessary cast expr,
Impala will pushdown this predicate to Kudu server, and this will save
lots of time and IO/memmory.

Test:
- Added unit test cases in `ExprRewriteRulesTest`

Change-Id: Iefdb87010e109d5bac398e8d54efd4a7a0f2371c
---
M fe/src/main/java/org/apache/impala/analysis/Analyzer.java
A fe/src/main/java/org/apache/impala/rewrite/CastExprSimplifyRule.java
M fe/src/test/java/org/apache/impala/analysis/ExprRewriteRulesTest.java
3 files changed, 140 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/30/17930/2
--
To view, visit http://gerrit.cloudera.org:8080/17930
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iefdb87010e109d5bac398e8d54efd4a7a0f2371c
Gerrit-Change-Number: 17930
Gerrit-PatchSet: 2
Gerrit-Owner: wangsheng <sky...@163.com>

Reply via email to