[jira] [Comment Edited] (CALCITE-35) Support parenthesized sub-clause in JOIN

2019-05-10 Thread Muhammad Gelbana (JIRA)


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

Muhammad Gelbana edited comment on CALCITE-35 at 5/10/19 3:15 PM:
--

I did what you asked me to. I had to tweak a few tests assertions for them to 
pass. Please have a look at the PR.


was (Author: mgelbana):
I what you asked me to. I had to tweak a few tests assertions for them to pass. 
Please have a look at the PR.

> Support parenthesized sub-clause in JOIN
> 
>
> Key: CALCITE-35
> URL: https://issues.apache.org/jira/browse/CALCITE-35
> Project: Calcite
>  Issue Type: Bug
>  Components: babel
>Affects Versions: 1.19.0
>Reporter: GitHub Import
>Priority: Major
>  Labels: github-import, pull-request-available
>  Time Spent: 10m
>  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
(v7.6.3#76005)


[jira] [Comment Edited] (CALCITE-35) Support parenthesized sub-clause in JOIN

2019-05-12 Thread Hongze Zhang (JIRA)


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

Hongze Zhang edited comment on CALCITE-35 at 5/12/19 9:20 AM:
--

Thanks Muhammad. I think the case should work properly this time. However the 
syntactic lookahead {{LOOKAHEAD(TableRef())}} brings quadratic behavior 
(O(n^2)) in parsing. Do we have chance to reduce it back to liner (O(n))? I 
suppose this was one of the main problems that block our effort on solving this 
issue before.


was (Author: zhztheplayer):
Thanks Muhammad. I think the case should work properly this time. However the 
semantic lookahead {{LOOKAHEAD(TableRef())}} brings quadratic behavior (O(n^2)) 
in parsing. Do we have chance to reduce it back to liner (O\(n\))? I suppose 
this was one of the main problems that block our effort on solving this issue 
before.

> 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
>  Time Spent: 50m
>  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
(v7.6.3#76005)


[jira] [Comment Edited] (CALCITE-35) Support parenthesized sub-clause in JOIN

2019-05-12 Thread Hongze Zhang (JIRA)


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

Hongze Zhang edited comment on CALCITE-35 at 5/12/19 9:21 AM:
--

Thanks Muhammad. I think the case should work properly this time. However the 
syntactic lookahead {{LOOKAHEAD(TableRef())}} brings quadratic behavior 
(O(n^2)) in parsing. Do we have chance to reduce it back to liner (O\(n\))? I 
suppose this was one of the main problems that block our effort on solving this 
issue before.


was (Author: zhztheplayer):
Thanks Muhammad. I think the case should work properly this time. However the 
syntactic lookahead {{LOOKAHEAD(TableRef())}} brings quadratic behavior 
(O(n^2)) in parsing. Do we have chance to reduce it back to liner (O(n))? I 
suppose this was one of the main problems that block our effort on solving this 
issue before.

> 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
>  Time Spent: 50m
>  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
(v7.6.3#76005)


[jira] [Comment Edited] (CALCITE-35) Support parenthesized sub-clause in JOIN

2019-05-22 Thread Muhammad Gelbana (JIRA)


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

Muhammad Gelbana edited comment on CALCITE-35 at 5/22/19 8:08 PM:
--

Thank you all for your time discussing this and excuse me for this very late 
reply. I closed the PR and provided a new one (I need to keep the original PR's 
branch) to protect against the broken fix I provided at first.

One final question, does it make sense to have this fix in BABEL since it's 
described as the parser that should hande all syntaxes ? I mean it sound 
reasonable to be slower when you're trying to fit in everything.


was (Author: mgelbana):
Thank you all for your time discussing this. I closed the PR and provided a new 
one (I need to keep the original PR's branch) to protect against the broken fix 
I provided at first.

One final question, does it make sense to have this fix in BABEL since it's 
described as the parser that should hande all syntaxes ? I mean it sound 
reasonable to be slower when you're trying to fit in everything.

> 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
>  Time Spent: 1h 10m
>  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
(v7.6.3#76005)


[jira] [Comment Edited] (CALCITE-35) Support parenthesized sub-clause in JOIN

2019-05-23 Thread Hongze Zhang (JIRA)


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

Hongze Zhang edited comment on CALCITE-35 at 5/24/19 3:18 AM:
--

Just my 2 cents - I would prefer coming up with a better solution, then put the 
changes to core parser, not only for babel, because the syntax is defined by 
SQL standard. From this perspective, porting current PR to babel is more like a 
workaround.

Anyway, I like the idea adding some defensive test cases first, thanks for that.


was (Author: zhztheplayer):
Just my 2 cents - I would prefer coming up with a better solution, then put the 
changes to core parser, not only for babel, because the syntax is defined by 
SQL standard. In the sense porting current PR to babel is more like a 
workaround.

Anyway, I like the idea adding some defensive test cases first, thanks for that.

> 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
>  Time Spent: 1h 10m
>  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
(v7.6.3#76005)