impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Tauber-Marshall (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-4716: Expr rewrite causes IllegalStateException
Date Wed, 11 Jan 2017 23:38:18 GMT
Thomas Tauber-Marshall has uploaded a new patch set (#3).

Change subject: IMPALA-4716: Expr rewrite causes IllegalStateException
......................................................................

IMPALA-4716: Expr rewrite causes IllegalStateException

The DECODE constructor in CaseExpr uses the same decodeExpr object when
building the BinaryPredicates that compare the decodeExpr to each 'when'
of the DECODE. This causes problems when different BinaryPredicates try
to cast the same decodeExpr object to different types during analysis,
in this case leading to a Precondition check failure.

The solution is to clone the decodeExpr in the DECODE constructor in
CaseExpr for each generated BinaryPredicate.

Testing:
- Added a regression test to RewriteExprRulesTest.

Change-Id: I4de9ed7118c8d18ec3f02ff74c9cca211c716e51
---
M fe/src/main/java/org/apache/impala/analysis/CaseExpr.java
M fe/src/test/java/org/apache/impala/analysis/ExprRewriteRulesTest.java
2 files changed, 11 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/31/5631/3
-- 
To view, visit http://gerrit.cloudera.org:8080/5631
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I4de9ed7118c8d18ec3f02ff74c9cca211c716e51
Gerrit-PatchSet: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Thomas Tauber-Marshall <tmarshall@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <mj@cloudera.com>
Gerrit-Reviewer: Thomas Tauber-Marshall <tmarshall@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <tarmstrong@cloudera.com>

Mime
View raw message