[ 
https://issues.apache.org/jira/browse/CALCITE-6592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

xiong duan updated CALCITE-6592:
--------------------------------
    Description: 
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]) 
or (NULL, =($0, 5)).

  was:
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]).


> 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
>            Priority: Major
>
> 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]) or (NULL, =($0, 5)).



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

Reply via email to