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 18:14:00 UTC
[jira] [Resolved] (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 resolved CALCITE-7377.
----------------------------------
Fix Version/s: 1.42.0
Resolution: Fixed
Fixed in [https://github.com/apache/calcite/commit/fd7220017887c96a46ff604a67954242a67b1513]
Thank you for the reviews [~dmsysolyatin] [~jensen]
> 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
> Fix For: 1.42.0
>
>
> {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)