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

LEFT OUTER JOIN with constants returns errors #2964

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

LEFT OUTER JOIN with constants returns errors #2964

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

Comments

@monetdb-team
Copy link

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

Date: 2012-01-04 14:11:32 +0100
From: Alfred Nordman <<alfred.nordman>>
To: SQL devs <>
Version: 11.7.5 (Dec2011) [obsolete]
CC: @drstmane

Last updated: 2012-02-29 10:34:26 +0100

Comment 16735

Date: 2012-01-04 14:11:32 +0100
From: Alfred Nordman <<alfred.nordman>>

User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0.1) Gecko/20100101 Firefox/8.0.1
Build Identifier:

When a LEFT OUTER JOIN query is run, if there are constants in the condition the query returns errors.

Reproducible: Always

Steps to Reproduce:

1.SELECT * FROM (SELECT 1 as c) a LEFT OUTER JOIN (SELECT 1 as c) b ON 1 = 1;
2.
3.

Actual Results:

TypeException:user.s7_1[17]:'algebra.markT' undefined in: _25:any := algebra.markT(_24:bit, _21:oid)
TypeException:user.s7_1[18]:'algebra.kdifference' undefined in: _26:any := algebra.kdifference(_18:bat[:oid,:bte], _25:any)
TypeException:user.s7_1[19]:'algebra.markT' undefined in: _27:any := algebra.markT(_26:any, _19:oid)
TypeException:user.s7_1[20]:'bat.reverse' undefined in: _28:any := bat.reverse(_27:any)
TypeException:user.s7_1[21]:'algebra.join' undefined in: _29:any := algebra.join(_28:any, _18:bat[:oid,:bte])
TypeException:user.s7_1[22]:'bat.reverse' undefined in: _30:any := bat.reverse(_25:any)
TypeException:user.s7_1[23]:'algebra.leftjoin' undefined in: _31:any := algebra.leftjoin(_30:any, _18:bat[:oid,:bte])
TypeException:user.s7_1[25]:'bat.append' undefined in: _35:any := bat.append(_32:bat[:oid,:bte], _31:any, _5:bit)
TypeException:user.s7_1[26]:'bat.append' undefined in: _36:any := bat.append(_35:any, _29:any, _5:bit)
TypeException:user.s7_1[32]:'algebra.project' undefined in: _44:any := algebra.project(_28:any, _43:bte)
TypeException:user.s7_1[40]:'bat.reverse' undefined in: _52:any := bat.reverse(_24:bit)
TypeException:user.s7_1[41]:'algebra.markT' undefined in: _53:any := algebra.markT(_52:any, _51:oid)
TypeException:user.s7_1[42]:'bat.reverse' undefined in: _54:any := bat.reverse(_53:any)
TypeException:user.s7_1[43]:'algebra.leftjoin' undefined in: _55:any := algebra.leftjoin(_54:any, _50:bat[:oid,:bte])
TypeException:user.s7_1[45]:'bat.append' undefined in: _57:any := bat.append(_56:bat[:oid,:bte], _55:any, _58:bit)
TypeException:user.s7_1[46]:'bat.append' undefined in: _59:any := bat.append(_57:any, _44:any, _58:bit)
SQLException:SQLengine:Program contains errors

Expected Results:

+------+------+
| c | c |
+======+======+
| 1 | 1 |
+------+------+

MonetDB 5 server v11.5.9 "Aug2011-SP3"
Serving database 'demo', using 8 threads
Compiled for x86_64-pc-winnt/64bit with 64bit OIDs dynamically linked
Found 15.990 GiB available main-memory.
Copyright (c) 1993-July 2008 CWI.
Copyright (c) August 2008-2011 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Listening for connection requests on mapi:monetdb://127.0.0.1:50000/
MonetDB/SQL module loaded

Comment 16979

Date: 2012-02-23 14:44:25 +0100
From: @njnes

Changeset 86d94f21e92c 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=86d94f21e92c

Changeset description:

fixed bugs 3034, 2964 2946 and 3017

The rel2bin_join didn't handle a bunch of corner cases
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