[
https://issues.apache.org/jira/browse/CALCITE-6599?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17884993#comment-17884993
]
xiong duan commented on CALCITE-6599:
-------------------------------------
For Values:
{{}}
{code:java}
{code}
{{values(1, 2, 3, null), (1, 2, null, null), (5, 2, 3, null)}}
We pull up the predicate is {{{}[=($1, 2), IS NULL($3)]{}}}. Do we need to
extract {{{}[OR(IS NULL($2), =($2, 3))]{}}}?
According to the Javadoc in
RelMdPredicates#getPredicates(Values,RelMetadataQuery)
/**
* Infers predicates for a Values.
*
* <p>The predicates on \{@code T (x, y, z)} with rows
* \{@code (1, 2, null), (1, 2, null), (5, 2, null)} are \{@code 'y = 2'} and
\{@code 'z is null'}.
*/
We don't need to do it.
> 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)