[
https://issues.apache.org/jira/browse/CALCITE-2926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16795490#comment-16795490
]
Julian Hyde commented on CALCITE-2926:
--------------------------------------
One aspect of SQL that sucks: it has many ways to represent collections -
tables, columns whose values are arrays, columns whose values are multisets,
and the parenthesized list on the right-hand side of the IN operator - but you
are not allowed to interoperate those collections. You can't even use the same
operators. For instance, you can't use {{UNION}} on multisets, you have to use
{{MULTISET UNION}}.
It is reasonable of you to want to use the {{IN}} operator on arrays.
Unfortunately it wouldn't be standard SQL.
> IN operator type validation failure
> -----------------------------------
>
> Key: CALCITE-2926
> URL: https://issues.apache.org/jira/browse/CALCITE-2926
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.18.0
> Reporter: Will Yu
> Priority: Major
>
> There are two columns in my table. Column A's type is VARCHAR while column
> B's type is VARCHAR ARRAY.
> When validating the SQL call `A IN B` the validation failed.
> The root cause seems to be in checkTypes functions in SqlInOperator.
> # Not sure whether UNORDERED comparator is a good candidate because IN
> operands should have order.
> # During being checked in the checker, `canConvertStringInCompare` will give
> a `false` when family is ARRAY and cause this failure.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)