You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Michael Smith (Jira)" <ji...@apache.org> on 2024/08/13 18:14:00 UTC

[jira] [Comment Edited] (IMPALA-13203) ExprRewriter did not rewrite 'id = 0 OR false' as expected

    [ https://issues.apache.org/jira/browse/IMPALA-13203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17873279#comment-17873279 ] 

Michael Smith edited comment on IMPALA-13203 at 8/13/24 6:13 PM:
-----------------------------------------------------------------

This appears to fix a regression that lead to IllegalStateException
{code}
ERROR: IllegalStateException: Illegal reference to non-materialized slot: tid=87 sid=680
{code}

Still trying to track down where the regression was introduced.


was (Author: JIRAUSER288956):
This appears to represent a regression that can lead to IllegalStateException
{code}
ERROR: IllegalStateException: Illegal reference to non-materialized slot: tid=87 sid=680
{code}

>  ExprRewriter did not rewrite 'id = 0 OR false' as expected
> -----------------------------------------------------------
>
>                 Key: IMPALA-13203
>                 URL: https://issues.apache.org/jira/browse/IMPALA-13203
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Frontend
>    Affects Versions: Impala 4.4.0
>            Reporter: Zihao Ye
>            Assignee: Zihao Ye
>            Priority: Critical
>             Fix For: Impala 4.5.0
>
>
> The comments in the SimplifyConditionalsRule class mention that 'id = 0 OR false' would be rewritten to 'id = 0', but in reality, it does not perform this rewrite as expected. After executing such SQL, we can see in the text plan that:
> {code:sql}
> Analyzed query: SELECT * FROM functional.alltypestiny WHERE FALSE OR id = CAST(0
> AS INT) {code}
> The issue appears to be that the CompoundPredicate generated by NormalizeExprsRule was not analyzed, causing the SimplifyConditionalsRule to skip the rewrite.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org