[ 
https://issues.apache.org/jira/browse/CALCITE-5216?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Julian Hyde updated CALCITE-5216:
---------------------------------
    Summary: Cannot parse parenthesized nested WITH clause  (was: Cannot parse 
parenthesized nested with clause)

> Cannot parse parenthesized nested WITH clause
> ---------------------------------------------
>
>                 Key: CALCITE-5216
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5216
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.30.0
>            Reporter: Wenrui Meng
>            Assignee: Julian Hyde
>            Priority: Major
>
>  CALCITE-35  introduced issues to parse the parenthesized sub-query such as 
> union and nested with. It's considered as a regression. 
> CALCITE-5194  resolved the parenthesized union issue while the nested with 
> still failed on parsing. 
>  
> Here is a sample nested with SQL statement that fails the parsing
>  
> {code:java}
> with a as (with b as (select 1)(select 1)) select * from a   {code}
>  
> Here is the stack trace summary
> {code:java}
>     at 
> org.apache.calcite.sql.parser.SqlParserTest$TesterImpl.parseStmtAndHandleEx(SqlParserTest.java:10184)
>     at 
> org.apache.calcite.sql.parser.SqlParserTest$TesterImpl.check(SqlParserTest.java:10169)
>     at 
> org.apache.calcite.sql.parser.SqlParserFixture.ok(SqlParserFixture.java:83)
>     at 
> org.apache.calcite.sql.parser.SqlParserTest.testNestedWith(SqlParserTest.java:7941)
>     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
> Method)
>     at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
>     at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.base/java.lang.reflect.Method.invoke(Method.java:567)
>     at 
> org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:725)
>     at 
> org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
>  ..........
> Caused by: org.apache.calcite.sql.parser.SqlParseException: Encountered "(" 
> at line 1, column 32.  {code}



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

Reply via email to