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

Aggregation over complex OR expressions produce wrong results #6209

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

Aggregation over complex OR expressions produce wrong results #6209

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

Comments

@monetdb-team
Copy link

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

Date: 2017-02-10 05:12:03 +0100
From: @yzchang
To: SQL devs <>
Version: 11.23.13 (Jun2016-SP2)
CC: @yzchang

Last updated: 2017-03-03 10:24:11 +0100

Comment 24997

Date: 2017-02-10 05:12:03 +0100
From: @yzchang

Aggregations over complex OR expressions, such as the following, produce wrong results:

CREATE TABLE test (id INT, a INT, b INT);
INSERT INTO test VALUES (0, 1, 2);
SELECT COUNT(*) FROM test WHERE (b = 1 OR b = 2) AND (a NOT IN (3, 4) OR b <> 1) AND a = 1;

The same problem exists for other aggregations, such as SUM.

Comment 24998

Date: 2017-02-10 05:14:50 +0100
From: @yzchang

The problem already exists in Jun2016-SP2, but is only recently discovered, and hence the fix went into the Dec2016 branch:

http//devmonetdborg/hg/MonetDB?cmd=changeset;node=eaf1c8c65072

Test was added in:
sql/test/BugTracker-2017/Tests/complicated_logic.Bug-105.sql

Comment 25108

Date: 2017-03-03 10:24:11 +0100
From: @sjoerdmullender

Dec2016-SP2 has been released, incorporating the fix.

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