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

pushselect optimizer bug on MAL snippet #6079

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

pushselect optimizer bug on MAL snippet #6079

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


Copy link

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

Date: 2016-10-15 20:34:29 +0200
From: muesli4
To: MonetDB5 devs <>
Version: 11.23.13 (Jun2016-SP2)
CC: @mlkersten

Last updated: 2017-01-26 14:56:24 +0100

Comment 24515

Date: 2016-10-15 20:34:29 +0200
From: muesli4

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

I don't know whether it's directly related to the pushselect optimizer, but the following snippet only fails with it:


function f156() (v11:bat[:lng]);
v0:int := sql.mvc();
v1:bat[:oid] := sql.tid(v0, "sys", "customer");
v2:bat[:lng] := sql.bind(v0, "sys", "customer", "c_acctbal", 0:int);
(v3:bat[:oid], v4:bat[:lng]) := sql.bind(v0, "sys", "customer", "c_acctbal", 2:int);
v5:bat[:lng] := sql.bind(v0, "sys", "customer", "c_acctbal", 1:int);
v6:bat[:lng] :=, v3, v4, v5);
v7:bat[:lng] := algebra.projection(v1, v6);
v10:bat[:oid] := algebra.subselect(v7, 700000:lng, nil:lng, false, false, false);
v11:bat[:lng] := algebra.projection(v10, v7);
v16:bat[:oid] := bat.mirror(v10);

 v18:bat[:lng] := algebra.projection(v16, v11);

 return v11;

end f156;
optimizer.pushselect("user", "f156");
v11:bat[:lng] := f156();

Reproducible: Always

Steps to Reproduce:

1.Run the snippet

Actual Results:

MonetDB crashes with a segfault.

Mercurial revision: 3b06c3df35f7

Comment 24516

Date: 2016-10-15 20:35:21 +0200
From: muesli4

Created attachment 480
MAL Code that fails

Attached file: bug.mal (application/octet-stream, 770 bytes)
Description: MAL Code that fails

Comment 24845

Date: 2016-12-21 23:23:10 +0100
From: @mlkersten

Added the test to the testsuite.
Added defensive code to avoid raising this assertion.

Comment 24915

Date: 2017-01-26 14:56:24 +0100
From: @kutsurak

Fixed in version Dec2016-SP1.

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