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

thetajoin produces invalid/inconsistent bat #2974

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

thetajoin produces invalid/inconsistent bat #2974

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-14 13:43:49 +0100
From: @grobian
To: GDK devs <>
Version: -- development

Last updated: 2012-03-16 14:56:56 +0100

Comment 16773

Date: 2012-01-14 13:43:49 +0100
From: @grobian

The following snippet demonstrates a problem with the result of a thetajoin.
(it is not blocking me at the moment, because the thetajoin doesn't do what I need, which I'm affraid is by design of the thetajoin, similar to antijoin problems)

l := bat.new(:oid, :int);
r := bat.new(:oid, :int);

l := bat.insert(l, 2@0, 1);
l := bat.insert(l, 6@0, 2);

r := bat.insert(r, 3@0, 1);
r := bat.insert(r, 7@0, 2);

rr := bat.reverse(r);

t := algebra.thetajoin(l, rr, 1); gt

io.print(t); returns 6@0 3@0 (2 is greater than 1? w/e)

b := bat.new(:oid, :oid);
b := bat.insert(b, t); BUG: ERROR: BATkey: dense column must be unique.

Comment 17023

Date: 2012-02-28 15:49:22 +0100
From: @sjoerdmullender

(In reply to comment 0)

The following snippet demonstrates a problem with the result of a thetajoin.
(it is not blocking me at the moment, because the thetajoin doesn't do what I
need, which I'm affraid is by design of the thetajoin, similar to antijoin
problems)

l := bat.new(:oid, :int);
r := bat.new(:oid, :int);

l := bat.insert(l, 2@0, 1);
l := bat.insert(l, 6@0, 2);

r := bat.insert(r, 3@0, 1);
r := bat.insert(r, 7@0, 2);

rr := bat.reverse(r);

t := algebra.thetajoin(l, rr, 1); gt

io.print(t); returns 6@0 3@0 (2 is greater than 1? w/e)

Yes, 2 is greater than 1.

b := bat.new(:oid, :oid);
b := bat.insert(b, t); BUG: ERROR: BATkey: dense column must be unique.

This is a matter of incorrect property setting. It can be solved by calling BATsettrivprop() at the end of BATnlthetajoin.
It is worth checking for similar situations (all functions that return a new BAT?).

Comment 17024

Date: 2012-02-28 16:53:01 +0100
From: @sjoerdmullender

Changeset 84a308d197ae made by Sjoerd Mullender sjoerd@acm.org in the MonetDB repo, refers to this bug.

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

Changeset description:

When returning a BAT to the intrepreter, set the trivial properties.
BBPkeepref is called whenever a new BAT is returned to the
interpreter, so it is a good place to set trivial properties
(properties which can be inferred trivially).
This fixes bug #2974.
Also added test for the bug.

Comment 17025

Date: 2012-02-28 16:54:29 +0100
From: @sjoerdmullender

Fixed.

Comment 17104

Date: 2012-03-16 14:56:56 +0100
From: @grobian

Released in Dec2011-SP2

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