Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-6592

RelMdPredicates pull up wrong predicate from UNION when it's input include NULL VALUE

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      The RelNode:

      LogicalUnion(all=[true])
        LogicalValues(tuples=[[{ NULL }]])
        LogicalValues(tuples=[[{ 131 }]])

       The predicate is '$0 == 131'

      LogicalUnion(all=[true])
        LogicalValues(tuples=[[{ 11 }]])
        LogicalValues(tuples=[[{ 131 }]])
      {pulled[SEARCH($0, Sarg[11, 131])]}

      The Predicate is SEARCH($0, Sarg[11, 131]).

      So the first RelNode's Predicate should be NONE or SEARCH($0, Sarg[null, 131]) or (NULL, =($0, 5)).

      Attachments

        Issue Links

          Activity

            There are no comments yet on this issue.

            People

              Unassigned Unassigned
              nobigo xiong duan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: