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

Stamatis Zampetakis commented on CALCITE-6608:
----------------------------------------------

I added an extra test in the PR to validate that {{SEARCH($0, Sarg[100])}} is 
transformed to {{=($0, 100)}} by the simplifier and thus aligns with the new 
behavior of {{RexBuilder#makeIn}} method.

> RexBuilder#makeIn should create EQUALS instead of SEARCH for single point 
> values
> --------------------------------------------------------------------------------
>
>                 Key: CALCITE-6608
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6608
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Stamatis Zampetakis
>            Assignee: Stamatis Zampetakis
>            Priority: Minor
>
> {code:java}
> RexBuilder.makeIn(inputRef(0), ImmutableList.of(literal(100)))
> {code}
> Current behavior:
> {noformat}
> SEARCH($0, Sarg[100])
> {noformat}
> Proposed behavior:
> {noformat}
> =($0, 100)
> {noformat}
> The EQUALS operator is simpler than the SEARCH operator and it is handled 
> better by other components. Although, the SEARCH to EQUALS transformation is 
> already something that is done during simplification not every piece of code 
> calls the simplifier.
> This basic simplification could also be done directly inside the makeIn 
> method when the caller passes a single point value.



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

Reply via email to