[ https://issues.apache.org/jira/browse/CALCITE-5299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jess Balint closed CALCITE-5299. -------------------------------- Resolved in release 1.33.0 (2023-02-06) > 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: Bug > Reporter: Mou Wu > Assignee: Mou Wu > Priority: Minor > Labels: pull-request-available > Fix For: 1.33.0 > > Time Spent: 3h 20m > Remaining Estimate: 0h > > 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)