[
https://issues.apache.org/jira/browse/CALCITE-7775?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18114609#comment-18114609
]
Jerome Isaac Haltom edited comment on CALCITE-7775 at 9/12/26 3:42 PM:
-----------------------------------------------------------------------
The answer is apparently not. Where I'm using it is in using VIEWs and
subselects to expand and extract 'untyped' data out of a structured NoSQL data
source that has no schema. So, for me, it isn't appearing on a real table, but
on an a select statement against a view which yanks a nested property of
unknown type out of a document.
I am unsure whether THAT is allowed!
was (Author: JIRAUSER287703):
The answer is apparently not. Where I'm using it is in using VIEWs to expand
and extract 'untyped' data out of a structured NoSQL data source that has no
schema. So, for me, it isn't appearing on a real table, but on an a select
statement against a VIEW which yanks a nested property of unknown type out of a
document.
I am unsure whether THAT is allowed!
> 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)