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

Extra condition in join predicate of explicit join produces wrong MAL code #4070

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


Copy link

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

Date: 2016-09-21 19:45:39 +0200
From: muesli4
To: SQL devs <>
Version: 11.23.7 (Jun2016-SP1)
CC: @njnes

Last updated: 2016-10-13 10:04:16 +0200

Comment 22380

Date: 2016-09-21 19:45:39 +0200
From: muesli4

User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0
Build Identifier:

The following SQL snippet goes through the SQL code generator and fails within the MAL-Backend:

SELECT 1 FROM orders LEFT OUTER JOIN customer ON (1 = 1 AND o_custkey = c_custkey);

Exact error message:
TypeException:user.s2_1[14]:'algebra.projection' undefined in: algebra.projection(X_5:bit,X_21:bat[:oid]);

Reproducible: Always

Compiled from Mercurial version (but also exists in the last release version): 1db157d67d26

MonetDB 5 server v11.24.0 (64-bit, 128-bit integers)
This is an unreleased version
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2016 MonetDB B.V., all rights reserved
Visit for further information
Found 4.8GiB available memory, 2 available cpu cores
libpcre: 8.39 2016-06-14 (compiled with 8.39)
openssl: OpenSSL 1.0.2h 3 May 2016 (compiled with OpenSSL 1.0.2h 3 May 2016)
libxml2: 2.9.4 (compiled with 2.9.4)
Compiled by: ...@phi (x86_64-unknown-linux-gnu)
Compilation: gcc -O3 -fomit-frame-pointer -pipe -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code -D_FORTIFY_SOURCE=2
Linking : /usr/bin/ld -m elf_x86_64

Comment 22381

Date: 2016-09-21 19:46:19 +0200
From: muesli4

Created attachment 403
The SQL snippet.

Attached file: bug.sql (application/sql, 93 bytes)
Description: The SQL snippet.

Comment 22396

Date: 2016-09-29 18:29:30 +0200
From: @njnes

fixed problem with constant compare expressions in the join expression list (normaly they get pushed down, but not with outer joins)

Comment 22397

Date: 2016-09-29 19:57:00 +0200
From: MonetDB Mercurial Repository <>

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

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

Changeset description:

fixed bug #4070, ie handle constant expressions in a outer join

Comment 24495

Date: 2016-10-13 10:04:16 +0200
From: @sjoerdmullender

Jun2016-SP2 has been released.

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