Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-13203

ExprRewriter did not rewrite 'id = 0 OR false' as expected

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • Impala 4.3.0, Impala 4.4.0
    • Impala 4.5.0, Impala 4.4.1
    • Frontend
    • None
    • ghx-label-6

    Description

      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:

      Analyzed query: SELECT * FROM functional.alltypestiny WHERE FALSE OR id = CAST(0
      AS INT) 

      The issue appears to be that the CompoundPredicate generated by NormalizeExprsRule was not analyzed, causing the SimplifyConditionalsRule to skip the rewrite.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            eyizoha Zihao Ye
            eyizoha Zihao Ye
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment