[
https://issues.apache.org/jira/browse/CALCITE-5261?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yu Xu resolved CALCITE-5261.
----------------------------
Fix Version/s: 1.43.0
Resolution: Fixed
Fixed in
[f229a2a|https://github.com/apache/calcite/commit/f229a2af3ea1bc622861c9ad132145cc50a99b38]
Thank you for reporting the Jira [~ronymin]
Thank you for the review [~mbudiu]
> UNION(ALL) inside of the CURSOR throws an exception while validating the query
> ------------------------------------------------------------------------------
>
> Key: CALCITE-5261
> URL: https://issues.apache.org/jira/browse/CALCITE-5261
> Project: Calcite
> Issue Type: Bug
> Reporter: Yoon-Min Nam
> Assignee: Yu Xu
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.43.0
>
>
> A problematic query uses the table used in the CSV tutorial (both union and
> union-all have the same issue):
> {code:java}
> select name from table(dedup(cursor(select name from depts union all select
> name from depts), 'name'));{code}
>
> {code:java}
> 0: jdbc:calcite:model=src/test/resources/mode> select name from
> table(dedup(cursor(select name from depts union all select name from depts),
> 'name'));
> Error: Error while executing SQL "select name from table(dedup(cursor(select
> name from depts union all select name from depts), 'name'))":
> org.apache.calcite.sql.SqlBasicCall cannot be cast to
> org.apache.calcite.sql.SqlSelect (state=,code=0)
> 0: jdbc:calcite:model=src/test/resources/mode> {code}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)