Austin Richardson created CALCITE-6303: ------------------------------------------
Summary: 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 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)