You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Mihai Budiu (Jira)" <ji...@apache.org> on 2026/01/15 04:18:00 UTC

[jira] [Updated] (CALCITE-7377) Validator should reject a DESCRIPTOR in a table function when it is not an identifier

     [ https://issues.apache.org/jira/browse/CALCITE-7377?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mihai Budiu updated CALCITE-7377:
---------------------------------
    Summary: Validator should reject a DESCRIPTOR in a table function when it is not an identifier  (was: Using an expression for a DESCRIPTOR in a table function crashes the validator)

> Validator should reject a DESCRIPTOR in a table function when it is not an identifier
> -------------------------------------------------------------------------------------
>
>                 Key: CALCITE-7377
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7377
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.41.0
>            Reporter: Mihai Budiu
>            Assignee: Mihai Budiu
>            Priority: Minor
>              Labels: pull-request-available
>
> {code:java}
> select * from table(hop(table orders, descriptor(1 + 2), interval '2' hour, interval '1' hour)) {code}
> Effect:
> {code:java}
>  java.lang.ClassCastException: class org.apache.calcite.sql.SqlBasicCall cannot be cast to class org.apache.calcite.sql.SqlIdentifier (org.apache.calcite.sql.SqlBasicCall and org.apache.calcite.sql.SqlIdentifier are in unnamed module of loader 'app')
>     at org.apache.calcite.sql.SqlIdentifier.lambda$simpleNames$3(SqlIdentifier.java:340)
>     at org.apache.calcite.util.Util$TransformingList.get(Util.java:2823)
>     at java.base/java.util.AbstractList$Itr.next(AbstractList.java:373)
>     at org.apache.calcite.linq4j.Ord.forEach(Ord.java:167)
>     at org.apache.calcite.sql.SqlWindowTableFunction$AbstractOperandMetadata.validateColumnNames(SqlWindowTableFunction.java:236)
>     at org.apache.calcite.sql.SqlWindowTableFunction$AbstractOperandMetadata.checkTableAndDescriptorOperands(SqlWindowTableFunction.java:184)
>     at org.apache.calcite.sql.SqlHopTableFunction$OperandMetadataImpl.checkOperandTypes(SqlHopTableFunction.java:48)
>     at org.apache.calcite.sql.SqlOperator.checkOperandTypes(SqlOperator.java:785){code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)