[ 
https://issues.apache.org/jira/browse/CALCITE-7027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17952948#comment-17952948
 ] 

Julian Hyde commented on CALCITE-7027:
--------------------------------------

Sergei, Take a look at 
https://patch-diff.githubusercontent.com/raw/apache/calcite/pull/4389.diff and 
tell me what is the ACTUAL point of this case. I think it's an end-user bug, 
and it can be explained without reference to SqlUtil#getSelectListItem.

> SqlUtil#getSelectListItem doesn't support union, intersect, except
> ------------------------------------------------------------------
>
>                 Key: CALCITE-7027
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7027
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Sergey Nuyanzin
>            Assignee: Sergey Nuyanzin
>            Priority: Major
>              Labels: pull-request-available
>
> -We have our exception classification system internally which based on cause 
> decides whether it is a user exception or not. Since currently there 
> {{Util#needToImplement}} which might be thrown from multiple places. We 
> prefer to not include the whole variety of {{Util#needToImplement}} to user 
> error since it would be tricky to control.-
> -The proposal is to introduce also some message part which could allow to add 
> more context what exactly is not implemented-
> -Also open to other suggestions-
> UPD: it looks the reason of failures we faced is unsupported {{UNION}}, 
> {{INTERSECT}}, {{EXCEPT}}, {{MINUS}} in {{SqlUtil#getSelectListItem}}
> renamed jira issue 
> to reproduce
> {code:sql}
> SELECT name FROM dept UNION SELECT name FROM dept UNION SELECT slacker FROM 
> emp
> {code}
> currently fails with
> {noformat}
> Caused by: java.lang.UnsupportedOperationException: class 
> org.apache.calcite.sql.SqlBasicCall: SELECT `NAME`
> FROM `DEPT`
> UNION
> SELECT `NAME`
> FROM `DEPT`
> {noformat}
> while the issue is type mismatch column
> after the fix it should fail as
> {noformat}
> Type mismatch in column 1 of UNION
> {noformat}



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

Reply via email to