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

Benchao Li commented on CALCITE-5299:
-------------------------------------

[~4wei] Actually, in Calcite, we do not use "type" field, that means we don't 
care what the value is for "type" field.

> JDBC adapter sometimes adds unnecessary parentheses around SELECT in WITH body
> ------------------------------------------------------------------------------
>
>                 Key: CALCITE-5299
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5299
>             Project: Calcite
>          Issue Type: Improvement
>            Reporter: Mou Wu
>            Assignee: Mou Wu
>            Priority: Minor
>
> Note: This issue is related to 
> https://issues.apache.org/jira/browse/CALCITE-5265
> You should view comments in CALCITE-5265 before you view this issue.
> Add a case in SqlParserTest:
>  
> {code:java}
> // code placeholder
> @Test void testWithSelect() {
>   final String sql = "with emp2 as (select * from emp)\n"
>       + "select * from emp2\n";
>   final String expected = "WITH `EMP2` AS (SELECT *\n" +
>       "FROM `EMP`) SELECT *\n" +
>       "FROM `EMP2`";
>   sql(sql).ok(expected);
> } {code}
> will fail, because actual sql is with parentheses.
>  



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

Reply via email to