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

Stamatis Zampetakis commented on CALCITE-5036:
----------------------------------------------

[~nobigo] What exactly happened in the revert performed 
https://github.com/apache/calcite/commit/d9363a952ce2e1905cca62cdee66076424267503.
 From the commit message, I cannot figure out what to say in the release notes. 

In the future, I think its better to push improvements under a dedicated JIRA 
since the way it is right now it creates confusion to end-users.

> `RelMetadataQuery#getPulledUpPredicates` support to analyze constant key for 
> the operator of IS_NOT_DISTINCT_FROM
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-5036
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5036
>             Project: Calcite
>          Issue Type: Improvement
>            Reporter: Xurenhe
>            Assignee: Xurenhe
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.31.0
>
>          Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> As we know, `IS NOT DISTINCT FROM` is NULL-Safe equal operator.
> The expression of "{*}`a` IS NOT DISTINCT FROM 10{*}" is equal to "{*}(`a` = 
> 10) IS TRUE{*}".
> Currently, `RelMetadataQuery#getPulledUpPredicates` could analyze the 
> constant from the constant's equal condition in the filter, not support `IS 
> NOT DISTINCT FROM`
> {code:java}
> -- sql
> SELECT deptno,
>        mgr,
>        ename
> FROM emp
> WHERE deptno IS NOT DISTINCT FROM 10{code}
> By the way, `deptno` need be rewritten to the constant project with number of 
> 10, when applying the rule of {*}CoreRules#PROJECT_REDUCE_EXPRESSION{*}S



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

Reply via email to