[
https://issues.apache.org/jira/browse/CALCITE-2926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16794133#comment-16794133
]
Will Yu commented on CALCITE-2926:
----------------------------------
[~hyuan]
I actually want to join two tables ON the condition that table_1.column_a
contains table_2.column_b, where table_1.column_a is an array type. The only
thing I can think of right now is
select
*
FROM
table_1
JOIN table_2 ON table_2.column_b IN (
select
*
from
unnest(table_1.column_a)
)
Do we have other options, like Presto contains function, to do that? Thanks!
> 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)