xiong duan created CALCITE-6592:
-----------------------------------

             Summary: RelMdPredicates pull up wrong predicate from UNION when 
it's input include NULL VALUE
                 Key: CALCITE-6592
                 URL: https://issues.apache.org/jira/browse/CALCITE-6592
             Project: Calcite
          Issue Type: Bug
            Reporter: xiong duan


The RelNode:
{code:java}
LogicalUnion(all=[true])
  LogicalValues(tuples=[[{ NULL }]])
  LogicalValues(tuples=[[{ 131 }]]){code}
 The predicate is '$0 == 131'
{code:java}
LogicalUnion(all=[true])
  LogicalValues(tuples=[[{ 11 }]])
  LogicalValues(tuples=[[{ 131 }]])
{pulled[SEARCH($0, Sarg[11, 131])]}{code}
The Predicate is SEARCH($0, Sarg[11, 131]).

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



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

Reply via email to