[
https://issues.apache.org/jira/browse/CALCITE-7775?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18114608#comment-18114608
]
Jerome Isaac Haltom commented on CALCITE-7775:
----------------------------------------------
That is a very good question. I have been using it only because Calcite let me
in almost every instance, except apparently this one.
I'm working on adapters for very fuzzy data engines. Document databases, and
other NoSQL stuff. Never thought to look.
> UNNEST of a column of type ANY cannot be implemented
> ----------------------------------------------------
>
> Key: CALCITE-7775
> URL: https://issues.apache.org/jira/browse/CALCITE-7775
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.42.0
> Reporter: Jerome Isaac Haltom
> Priority: Minor
>
> UNNEST of a column declared ANY validates and plans, and then fails when the
> plan is implemented.
> Given a table {{s.docs}} with columns {{ID}} INTEGER and {{TAGS}} ANY:
> {code:sql}
> select "D"."ID", "T"."X"
> from "s"."docs" as "D", UNNEST("D"."TAGS") as "T"("X")
> {code}
> {noformat}
> java.lang.IllegalStateException: Unable to implement
> EnumerableCalc(expr#0..2=[{inputs}], ID=[$t0], X=[$t2])
> suppressed: java.lang.NullPointerException: componentType is null for ANY
> at
> org.apache.calcite.sql.type.NonNullableAccessors.getComponentTypeOrThrow(NonNullableAccessors.java:52)
> at
> org.apache.calcite.adapter.enumerable.EnumerableUncollect.implement(EnumerableUncollect.java:139)
> {noformat}
> Same failure for {{LEFT JOIN UNNEST(...) ON TRUE}} and for {{WITH
> ORDINALITY}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)