[
https://issues.apache.org/jira/browse/IMPALA-14758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18060197#comment-18060197
]
ASF subversion and git services commented on IMPALA-14758:
----------------------------------------------------------
Commit bd214f0cf7ede1a140b8685df4122d3f677804b4 in impala's branch
refs/heads/master from Steve Carlin
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=bd214f0cf ]
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
Reviewed-on: http://gerrit.cloudera.org:8080/24006
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
> Calcite planner: Query with null return value in case statement crashes server
> ------------------------------------------------------------------------------
>
> Key: IMPALA-14758
> URL: https://issues.apache.org/jira/browse/IMPALA-14758
> Project: IMPALA
> Issue Type: Sub-task
> Reporter: Steve Carlin
> Priority: Major
>
> The following query is crashing the server because the return value in the
> "then" clause is null:
> 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)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]