Alice Fan has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/14540


Change subject: IMPALA-9023: Fix IllegalStateException in 
SimplifyConditionalsRule
......................................................................

IMPALA-9023: Fix IllegalStateException in SimplifyConditionalsRule

For 'case' function, if left WHEN condition is true, SimplifyConditionalsRule
will return THEN result-expression. However, the result-expression should not
be casted to original expression's type. This will cause result-expression
not re-analyzed and throwing IllegalStateException.

For example:
Query: select * from functional.alltypessmall where case when true then id < 50 
END
ERROR: IllegalStateException: null

Testing:
- Added e2e test to exprs.test
- Added unit test to ExprRewriteRulesTest

Change-Id: I640d577200e76121c72685e4aaba1ef312a2d8b4
---
M fe/src/main/java/org/apache/impala/rewrite/SimplifyConditionalsRule.java
M fe/src/test/java/org/apache/impala/analysis/ExprRewriteRulesTest.java
M testdata/workloads/functional-query/queries/QueryTest/exprs.test
3 files changed, 21 insertions(+), 2 deletions(-)



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I640d577200e76121c72685e4aaba1ef312a2d8b4
Gerrit-Change-Number: 14540
Gerrit-PatchSet: 1
Gerrit-Owner: Alice Fan <[email protected]>

Reply via email to