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

Subquery in select part goes wrong #2988

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

Subquery in select part goes wrong #2988

monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels
bug Something isn't working normal SQL

Comments

@monetdb-team
Copy link

Date: 2012-01-28 16:00:48 +0100
From: @skinkie
To: SQL devs <>
Version: -- development
CC: @njnes

Last updated: 2012-03-16 14:56:54 +0100

Comment 16838

Date: 2012-01-28 16:00:48 +0100
From: @skinkie

User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.83 Safari/535.2
Build Identifier:

sql>select 1, (select 1) as x;
+------+------+------+
| L12 | L11 | x |
+======+======+======+
| 1 | 1 | 1 |
+------+------+------+

select 1, (select 1 as y, 2 as z) as x;
+------+------+------+------+
| L21 | y | L20 | x |
+======+======+======+======+
| 1 | 1 | 2 | 2 |
+------+------+------+------+

Reproducible: Always

Expected Results:

PostgreSQL says;
select 1, (select 1 as y) as x;
?column? | x
----------+---
1 | 1

select 1, (select 1 as y, 2 as z) as x;
ERROR: subquery must return only one column

(actually trying to find the crash that caused my group by bug)

Comment 17002

Date: 2012-02-26 23:07:46 +0100
From: @njnes

corrected bug in simple_select, need alway to project full list of outer projection.

Comment 17003

Date: 2012-02-26 23:09:17 +0100
From: @njnes

Changeset 85e9bea7a75f made by Niels Nes niels@cwi.nl in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=85e9bea7a75f

Changeset description:

added test for bug #2988

fixed bug in rel_simple_select outer projection handling.

Comment 17010

Date: 2012-02-27 19:26:47 +0100
From: @njnes

*** Bug #2985 has been marked as a duplicate of this bug. ***

Comment 17099

Date: 2012-03-16 14:56:54 +0100
From: @grobian

Released in Dec2011-SP2

@monetdb-team monetdb-team added bug Something isn't working normal SQL labels Nov 30, 2020
@sjoerdmullender sjoerdmullender added this to the Ancient Release milestone Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working normal SQL
Projects
None yet
Development

No branches or pull requests

2 participants