Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested WITH queries not supported #6187

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

Nested WITH queries not supported #6187

monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels

Comments

@monetdb-team
Copy link

Date: 2017-01-13 15:26:25 +0100
From: muesli4
To: SQL devs <>
Version: -- development
CC: @njnes

Last updated: 2017-07-17 16:07:40 +0200

Comment 24891

Date: 2017-01-13 15:26:25 +0100
From: muesli4

User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0
Build Identifier:

Nested WITH queries don't work in MonetDB.

Reproducible: Always

Comment 24892

Date: 2017-01-13 15:26:54 +0100
From: muesli4

Created attachment 531
A test case.

Attached file: test_case.sql (application/sql, 100 bytes)
Description: A test case.

Comment 24954

Date: 2017-02-02 17:31:22 +0100
From: @sjoerdmullender

(In reply to muesli4 from comment 0)

User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101
Firefox/50.0
Build Identifier:

Nested WITH queries don't work in MonetDB.

True, but cascading them does.

Your example:
WITH t0(x) as (
WITH t1(y) as (
select 0
)
select * FROM t1
)
SELECT * FROM t0;

My rewrite:
with t1(y) as (
select 0
),
t0(x) as (
select * from t1
)
select * from t0;

Comment 25010

Date: 2017-02-12 14:04:23 +0100
From: @njnes

Nested WITH queries aren't supported as they aren't part of the sql standard (as far as we know)

Comment 25024

Date: 2017-02-15 17:11:16 +0100
From: @njnes

I checked the standard and nesting is indeed available (over looked it the first time). Also almost all of the code was there already, mostly some parsing changes were needed. This will be included in the next feature release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants