[
https://issues.apache.org/jira/browse/CALCITE-5386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17636908#comment-17636908
]
Julian Hyde commented on CALCITE-5386:
--------------------------------------
It would be a welcome feature. Your implementation plan looks plausible.
Would any parser changes be required?
I am curious: which databases currently support this syntax?
> Add support for LIKE (ANY | SOME | ALL)
> ---------------------------------------
>
> Key: CALCITE-5386
> URL: https://issues.apache.org/jira/browse/CALCITE-5386
> Project: Calcite
> Issue Type: New Feature
> Components: core
> Reporter: James Kim
> Priority: Minor
>
> Currently we only support LIKE calls with a single pattern, e.g. "x LIKE ( y
> )".
> Add support for LIKE ANY, LIKE SOME, and LIKE ALL which can be called with
> multiple patterns or a subquery, e.g. "x LIKE ANY (y, z)".
> LIKE ANY and LIKE SOME would behave the same way in that if a value is LIKE
> any of the given patterns, it would return true, and in the case of LIKE ALL,
> true only if the value is LIKE all of the patterns.
> Also support the negated versions of each, e.g. NOT LIKE ANY.
> In terms of implementation, we will use the ANY, SOME, and ALL functions we
> already have that currently work with =, <, >, etc. The goal is to add LIKE
> as one of the possible precursors of ANY, SOME, and ALL so that in
> combination it allows LIKE ANY, LIKE SOME, and LIKE ALL. ANY, SOME, and ALL
> already supports subqueries and multiple arguments.
> This would involve changes in the SubQueryRemoveRule where additional logic
> will be added for LIKE and NOT LIKE comparators.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)