You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered: