Impala Public Jenkins has submitted this change and it was merged. ( 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 cast the THEN result-expression to original expression's type before return result. In this Jira, we would like to remove the cast function for two reasons: 1. SimplifyConditionalsRule only applys to analyzed expression, which means expression has already been casted to compatible type before it reaches the expression rewrite step. 2. The cast function will cause IllegalStateException when 'CASE WHEN TRUE' appearing in the where conjunction. 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 - Added unit test to ExprRewriterTest Change-Id: I640d577200e76121c72685e4aaba1ef312a2d8b4 Reviewed-on: http://gerrit.cloudera.org:8080/14540 Reviewed-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com> --- M fe/src/main/java/org/apache/impala/rewrite/SimplifyConditionalsRule.java M fe/src/test/java/org/apache/impala/analysis/ExprRewriteRulesTest.java M fe/src/test/java/org/apache/impala/analysis/ExprRewriterTest.java M testdata/workloads/functional-query/queries/QueryTest/exprs.test 4 files changed, 54 insertions(+), 2 deletions(-) Approvals: Impala Public Jenkins: Looks good to me, approved; Verified -- 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: merged Gerrit-Change-Id: I640d577200e76121c72685e4aaba1ef312a2d8b4 Gerrit-Change-Number: 14540 Gerrit-PatchSet: 6 Gerrit-Owner: Alice Fan <fan...@gmail.com> Gerrit-Reviewer: Alice Fan <fan...@gmail.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Thomas Tauber-Marshall <tmarsh...@cloudera.com> Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com>