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

Jasmin Trada commented on CALCITE-5336:
---------------------------------------

Hi [~julianhyde],

So, here are my findings about the {{executor}}.

* The 27 tests that were not creating {{executor}} explicitly and still were 
able to use the {{executor}} is because they are using the {{SqlRelSupplier}}, 
whereas all the tests that were based on {{relFn}} are using {{FnRelSupplier}}.
* Now, in the {{SqlRelSupplier}}, we are creating an instance of 
{{MockRelOptPlanner}}, which sets an {{executor}} while initializing the 
{{planner}}.
* Whereas, in {{FnRelSupplier}}, we are creating an instance of 
{{VolcanoPlanner}} using {{FRAMEWORK_CONFIG}}, which does not set an 
{{executor}} in its {{planner}}.
* I do not have an in-depth knowledge about calcite, but what I think we can do 
to resolve this is we can add an {{executor}} while creating {{planner}} for 
{{FnRelSupplier}} at {{CalcitePrepareImpl.createPlanner}}.

Please let me know your thoughts about this change.

> Support inferring constants from predicates with IS NOT DISTINCT FROM operator
> ------------------------------------------------------------------------------
>
>                 Key: CALCITE-5336
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5336
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Jasmin Trada
>            Assignee: Jasmin Trada
>            Priority: Trivial
>              Labels: pull-request-available
>             Fix For: 1.33.0
>
>   Original Estimate: 168h
>          Time Spent: 10m
>  Remaining Estimate: 167h 50m
>
> Whenever we have {{IS NOT DISTINCT FROM}} operator in a predicate, the 
> {{predicateConstants}} method in {{RexUtil}} is not able to identify the 
> constants.
> E.g., If we make a predicate as given below,
> {code}
> //dec20 = IS_NOT_DISTINCT_FROM($0, CAST(2020-12-11):DATE)
> RexNode dec20 = rexB.makeCall(IS_NOT_DISTINCT_FROM,
>             rexB.makeInputRef(dateColumnType, 0),
>             rexB.makeLiteral(new DateString(2020, 12, 11), dateColumnType, 
> false));
> {code}
> and if we call {{RexUtil.predicateConstants(RexNode.class, rexB, 
> Arrays.asList(dec20))}},
> it will return an empty map, but it should have returned something like this:
> {code}
> { "$0" -> "CAST(2020-12-11):DATE"}
> {code}



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

Reply via email to