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

Unknown identifier from subquery #3704

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

Unknown identifier from subquery #3704

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

Comments

@monetdb-team
Copy link

Date: 2015-04-16 14:01:08 +0200
From: Richard Hughes <<richard.monetdb>>
To: SQL devs <>
Version: 11.19.9 (Oct2014-SP2)
CC: @njnes

Last updated: 2015-05-07 12:37:26 +0200

Comment 20801

Date: 2015-04-16 14:01:08 +0200
From: Richard Hughes <<richard.monetdb>>

Build is Oct2014 9c80de069c44 (head of that branch as of creation of this bug report)

create table foo (z int);
select aaa from (select 0,0,0,0,0,foo.z from foo)as t(aaa,b,c,d,e,f);

Expected:
null

Actual:
SELECT: identifier 'aaa' unknown

Some interesting observations:

  • Any fewer than 6 columns in the subquery and it'll work
  • Any more than 6 and it will still not work
  • Remove the qualified identifier 'foo.z' (i.e. just make it 'z') and it'll work
  • None of the subquery columns work (e.g. "select b from (select 0,0,0,0,0,foo.z from foo)as t(aaa,b,c,d,e,f);" doesn't work either)

Comment 20811

Date: 2015-04-18 22:36:51 +0200
From: @njnes

added missing (name) hash after adding the aliases.

Comment 20812

Date: 2015-04-18 22:39:43 +0200
From: @njnes

added test BugTracker-2015/alias.Bug-3704.sql

Comment 20813

Date: 2015-04-18 22:59:33 +0200
From: MonetDB Mercurial Repository <>

Changeset 8f6b8d6f6366 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=8f6b8d6f6366

Changeset description:

fixed bug #3704 (ie cleanup hash table after renaming expressions)
@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 Feb 7, 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