[
https://issues.apache.org/jira/browse/CALCITE-7226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18033329#comment-18033329
]
Mihai Budiu commented on CALCITE-7226:
--------------------------------------
Today SEARCH loses source position information. Could an implementation try to
carry this through?
Perhaps when incorporating multiple RexCall expressions the SEARCH can contain
the sum of their positions?
> Convert IN to SEARCH in SqlToRelConverter
> -----------------------------------------
>
> Key: CALCITE-7226
> URL: https://issues.apache.org/jira/browse/CALCITE-7226
> Project: Calcite
> Issue Type: Task
> Components: core
> Reporter: Stamatis Zampetakis
> Priority: Major
>
> Currently, the SqlToRelConverter translates IN expressions to:
> * a disjunctive expression (RexNode composed from OR operators)
> * a join with inline table holding all values (Values+Join RelNodes)
> In CALCITE-4173, the SEARCH operator was introduced to represent many kind of
> range expressions and among those IN lists of constant values. The SEARCH
> representation is superior to both disjunctive expressions and joins with
> inline tables so it should be used whenever possible in SqlToRelConverter.
> RexSimplify is able to detect and collapse disjunctive expressions to SEARCH
> but if we can do this earlier, during sql-to-rel conversion, we could save
> the unnecessary perf overhead of the simplification and also somewhat satisfy
> use-cases that explicitly requested the addition of a specialized IN operator
> (e.g., CALCITE-2630).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)