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

xiong duan resolved CALCITE-6303.
---------------------------------
    Fix Version/s: 1.39.0
       Resolution: Fixed

> UNION with CTE(s) results in exception during query validation
> --------------------------------------------------------------
>
>                 Key: CALCITE-6303
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6303
>             Project: Calcite
>          Issue Type: Bug
>    Affects Versions: 1.36.0
>            Reporter: Austin Richardson
>            Assignee: xiong duan
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.39.0
>
>
> Attempting to execute a query that includes a UNION with CTE(s) in one of its 
> operands results in a ClassCastException during query validation.
>  
> Example query:
>  
> {code:java}
> ( SELECT 123 )
> UNION
> ( WITH t (col) AS (VALUES (456)) SELECT col FROM t ) {code}
>  
> Snippet from resulting exception:
>  
> {code:java}
> java.lang.ClassCastException: class org.apache.calcite.sql.SqlNodeList cannot 
> be cast to class org.apache.calcite.sql.SqlCall
>     at 
> org.apache.calcite.sql.validate.SqlValidatorImpl.deduceModality(SqlValidatorImpl.java:4093){code}



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

Reply via email to