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

Function cannot find column in merge table #6288

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

Function cannot find column in merge table #6288

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

Comments

@monetdb-team
Copy link

@monetdb-team monetdb-team commented Nov 30, 2020

Date: 2017-04-18 17:16:24 +0200
From: @joerivanruth
To: SQL devs <>
Version: 11.25.15 (Dec2016-SP3)
CC: @njnes

Last updated: 2017-05-01 13:32:41 +0200

Comment 25245

Date: 2017-04-18 17:16:24 +0200
From: @joerivanruth

With the following script I would expect to receive two empty results. Instead, I get "unable to find banana.t(num)". This is both on default and on Dec2016_SP4_release.

DROP SCHEMA banana;
CREATE SCHEMA banana;
SET SCHEMA banana;

CREATE MERGE TABLE t ( num DECIMAL(8,2) DEFAULT NULL );
CREATE TABLE t0 ( num DECIMAL(8,2) DEFAULT NULL );
ALTER TABLE t ADD TABLE t0;

SELECT * FROM t;

CREATE FUNCTION foo ()
RETURNS TABLE (i DECIMAL(8,2))
BEGIN
RETURN SELECT * FROM t;
END;

-- this fails unexpectedly
SELECT * FROM foo();

Comment 25248

Date: 2017-04-19 13:58:09 +0200
From: MonetDB Mercurial Repository <>

Changeset 6df359498f13 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=6df359498f13

Changeset description:

fixed bug #6288, ie meretable wasn't rewritten within functions
Found/fixed problem in atom_mul, initialize result type

Comment 25249

Date: 2017-04-19 13:58:59 +0200
From: @njnes

Fixed, the use of mergetables in functions wasn't handled properly (in the optimizers). Now we rewrite it.

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

Successfully merging a pull request may close this issue.

None yet
1 participant