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

Julian Hyde commented on CALCITE-6599:
--------------------------------------

There's no reason that we can't get better (i.e. return correct predicates that 
are a superset of what we did in a previous release). We should also be careful 
to not return predicates of excessive size.

We should consider returning sargs (range or point sets, see CALCITE-4173). For
{code:java}
values(1, 2, 3, null), (1, 2, null, null), (5, 2, 3, null)
{code}
the predicate could be
{code:java}
a in sarg {1, 5}
and b = 2
and c in sarg {3, null}
and d is null
{code}
The predicate on {{a}} would allow a consumer to simplify {{a < 0}} to 
{{{}false{}}}.

> RelMdPredicates pull up wrong predicate from VALUES
> ---------------------------------------------------
>
>                 Key: CALCITE-6599
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6599
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: xiong duan
>            Priority: Major
>              Labels: pull-request-available
>
> For example:
> {code:java}
> {VALUES(1,2,3)}{code}
> Predicates should be ($0=1,$1=2,$2=3), but now is $0=1. 



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

Reply via email to