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

SELECT from a view of a view #3245

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

SELECT from a view of a view #3245

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


Copy link

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

Date: 2013-03-06 19:52:53 +0100
From: b0b0b0b
To: SQL devs <>
Version: 11.15.1 (Feb2013)
CC: @njnes

Last updated: 2013-04-29 14:51:28 +0200

Comment 18584

Date: 2013-03-06 19:52:53 +0100
From: b0b0b0b

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.33 (KHTML, like Gecko) Chrome/27.0.1430.0 Safari/537.33
Build Identifier:

TypeException:user.s1_1[63]:'algebra.subselect' undefined in: _111:any := algebra.subselect(_107:bat[:oid,:oid], _110:bit, _110:bit, _93:bit, _93:bit, _94:bit)
TypeException:user.s1_1[64]:'algebra.crossproduct' undefined in: (_112:any, r1_112:any) := algebra.crossproduct(_100:bat[:oid,:oid], _111:any)
TypeException:user.s1_1[72]:'algebra.leftfetchjoin' undefined in: _129:any := algebra.leftfetchjoin(_112:any, _125:bat[:oid,:str])
TypeException:user.s1_1[81]:'algebra.join' undefined in: (_141:any, r1_141:any) := algebra.join(_129:any, _137:bat[:oid,:str])
TypeException:user.s1_1[82]:'algebra.leftfetchjoin' undefined in: _143:any := algebra.leftfetchjoin(r1_141:any, _137:bat[:oid,:str])
TypeException:user.s1_1[93]:'algebra.join' undefined in: (_162:any, r1_162:any) := algebra.join(_143:any, _158:bat[:oid,:str])
TypeException:user.s1_1[101]:'algebra.leftfetchjoin' undefined in: _175:any := algebra.leftfetchjoin(_112:any, _171:bat[:oid,:str])
TypeException:user.s1_1[102]:'algebra.leftfetchjoin' undefined in: _176:any := algebra.leftfetchjoin(_141:any, _175:any)
TypeException:user.s1_1[105]:'algebra.leftfetchjoin' undefined in: _179:any := algebra.leftfetchjoin(_162:any, _176:any)
TypeException:user.s1_1[157]:'algebra.join' undefined in: (_261:any, r1_261:any) := algebra.join(_179:any, _258:bat[:oid,:str])

Reproducible: Always

Steps to Reproduce:

create table tbl_a (id int primary key,
c_id int,
str1 varchar(128),
str2 varchar(128),
str3 varchar(128),
int1 int,
str4 varchar(128));

create table tbl_b (id int primary key,
int1 int);

create table tbl_c (id int primary key,
str1 varchar(128),
str2 varchar(128),
str3 varchar(128));

create table tbl_d (a_id int, str1 varchar(128));

create view view_a as
select a.*,b.int1 as bint1,d.str1 as dstr1
from tbl_a a
inner join tbl_b b on
inner join tbl_d d on;

create view view_b as
select view_a.*
from view_a
inner join tbl_c on
where 1=1
and view_a.str1 = 'foo'
and view_a.str2 = 'bar'
and view_a.str3 = 'baz'
and tbl_c.str1 <> 'foobar'
and tbl_c.str2 = 'foobarbaz'
and tbl_c.str3 is null;

create view view_c as
select * from view_b
where 1=1
and view_b.int1 = 0;

create view view_d as
select * from view_c
where str4 < 'zzzzz';

select * from view_d order by id;
--failure here

Actual Results:

some kind of query plan exception

Expected Results:

no exception

This also fails on mac osx for me, where I've installed monetdb using homebrew (so the issue isn't my compiler or environment AFAICT).

Comment 18585

Date: 2013-03-06 22:13:16 +0100
From: @sjoerdmullender

Changeset 765ddafed310 made by Sjoerd Mullender in the MonetDB repo, refers to this bug.

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

Changeset description:

Added test for bug #3245.

Comment 18626

Date: 2013-03-20 15:55:17 +0100
From: @njnes

Changeset 59ae06013de6 made by Niels Nes in the MonetDB repo, refers to this bug.

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

Changeset description:

approved output
fixed bug view-view, bug #3245

Comment 18627

Date: 2013-03-20 17:01:25 +0100
From: @njnes

Changeset fbe6baf096f2 made by Niels Nes in the MonetDB repo, refers to this bug.

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

Changeset description:

backported fix for bug #3245

Comment 18629

Date: 2013-03-20 20:05:37 +0100
From: @njnes

fixed, the handling of 1=1 needed improvement after the move to subselect and friends

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

Successfully merging a pull request may close this issue.

None yet
1 participant