Hello Aman Sinha, Joe McDonnell, Michael Smith, Impala Public Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/24006
to look at the new patch set (#4).
Change subject: IMPALA-14758: Calcite planner: Return value with "in" and case
statement crashes server.
......................................................................
IMPALA-14758: Calcite planner: Return value with "in" and case statement
crashes server.
The following query was crashing the server with the Calcite planner:
SELECT a.id, a.int_col, a.string_col FROM alltypessmall a
WHERE 1 NOT IN
(SELECT CASE WHEN id = 1 then null ELSE id END FROM alltypestiny)
The AnalyzedInPredicate was setting the savedFunction before the case
statement was analyzed. At this point, the case statement had an invalid
type for its return type. The getFunction() for the in clause was
being set to null which caused bad things to happen on the server.
The fn_ variable is now set at analyze time when the case statement
is assured to have a return type.
Change-Id: I397b8e3438d8f5d59725bed6fc166f842596818f
---
M
java/calcite-planner/src/main/java/org/apache/impala/calcite/functions/AnalyzedInPredicate.java
M
java/calcite-planner/src/main/java/org/apache/impala/calcite/functions/RexCallConverter.java
M testdata/workloads/functional-query/queries/QueryTest/calcite.test
3 files changed, 15 insertions(+), 16 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/06/24006/4
--
To view, visit http://gerrit.cloudera.org:8080/24006
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I397b8e3438d8f5d59725bed6fc166f842596818f
Gerrit-Change-Number: 24006
Gerrit-PatchSet: 4
Gerrit-Owner: Steve Carlin <[email protected]>
Gerrit-Reviewer: Aman Sinha <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>