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 Thu, 12 Jan 2017 21:23:45 GMT
Hello Tim Armstrong,

I'd like you to reexamine a change.  Please visit

    http://gerrit.cloudera.org:8080/5631

to look at the new patch set (#4).

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 exprs.test

Change-Id: I4de9ed7118c8d18ec3f02ff74c9cca211c716e51
---
M fe/src/main/java/org/apache/impala/analysis/CaseExpr.java
M testdata/workloads/functional-query/queries/QueryTest/exprs.test
2 files changed, 24 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/31/5631/4
-- 
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: 4
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Thomas Tauber-Marshall <tmarshall@cloudera.com>
Gerrit-Reviewer: Marcel Kornacker <marcel@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