wangsheng has uploaded this change for review. ( http://gerrit.cloudera.org:8080/17933
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. Testing: - Added unit test cases in `ExprRewriteRulesTest` Change-Id: Id8fac7100060d4e139a8b24d4795c6f279c55954 --- 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/33/17933/2 -- To view, visit http://gerrit.cloudera.org:8080/17933 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Id8fac7100060d4e139a8b24d4795c6f279c55954 Gerrit-Change-Number: 17933 Gerrit-PatchSet: 2 Gerrit-Owner: wangsheng <[email protected]>
