Thomas Marshall has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/11179


Change subject: IMPALA-7419: Fix NullPointerException in 
SimplifyConditionalsRule
......................................................................

IMPALA-7419: Fix NullPointerException in SimplifyConditionalsRule

In SimplifyConditionalsRule, when simplifying a 'coalesse' where the
result is another coalesce with some children removed, we create a new
Expr for the new coalesce but previously were not analyzing the new
Expr.

This causes problems if the simplified Expr contains an aggregate
function, as we check to make sure the simplification didn't eliminate
any aggregates and the check expects the Expr to be analyzed.

The solution is to analyze the new Expr after creating it.

Testing:
- Added a FE test to ExprRewriteRulesTest

Change-Id: I5d066b48c2824cc09ce21260ad06b3d50b14c54a
---
M fe/src/main/java/org/apache/impala/rewrite/SimplifyConditionalsRule.java
M fe/src/test/java/org/apache/impala/analysis/ExprRewriteRulesTest.java
2 files changed, 12 insertions(+), 5 deletions(-)



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5d066b48c2824cc09ce21260ad06b3d50b14c54a
Gerrit-Change-Number: 11179
Gerrit-PatchSet: 1
Gerrit-Owner: Thomas Marshall <[email protected]>

Reply via email to