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

Wenrui Meng commented on CALCITE-35:
------------------------------------

[~julianhyde] After this fix, the following query becomes invalid during 
parsingĀ 
{code:java}
with a as (with b as (select 1)(select 1)) select * from a {code}
in Query(), it has
{code:java}
[
    withList = WithList()
]
e = LeafQuery(exprContext)
 {code}
while it previously use QueryOrExpr
{code:java}
[
    withList = WithList()
]
e = LeafQueryOrExpr(exprContext)
 {code}
I'm not sure whether this is intended. Most query engines support the above 
query. In addition, the dialect also output the query with () enclosed. Is it 
OK to change Query() to use
{code:java}
e = LeafQueryOrExpr(exprContext){code}

> Support parenthesized sub-clause in JOIN
> ----------------------------------------
>
>                 Key: CALCITE-35
>                 URL: https://issues.apache.org/jira/browse/CALCITE-35
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.19.0
>            Reporter: GitHub Import
>            Priority: Major
>              Labels: github-import, pull-request-available
>             Fix For: 1.31.0
>
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> SQL-92 allows joins to be grouped into trees using parentheses. For example,
>   select * from a join (b join c on b.x = c.x) on a.y = c.y
> Optiq should support this. Currently this gives 
> "org.eigenbase.util.EigenbaseException: Non-query expression encountered in 
> illegal context".
> ---------------- Imported from GitHub ----------------
> Url: https://github.com/julianhyde/optiq/issues/35
> Created by: [julianhyde|https://github.com/julianhyde]
> Labels: 
> Created at: Fri Apr 19 02:46:01 CEST 2013
> State: open



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to