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
Date: 2019-02-18 18:38:35 +0100
From: Manuel <>
To: SQL devs <>
Version: 11.29.7 (Mar2018-SP1)
CC: @njnes
Last updated: 2019-11-28 10:00:06 +0100
Comment 26893
Date: 2019-02-18 18:38:35 +0100
From: Manuel <>
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36
Build Identifier:
With a table created as follows:
CREATE TABLE "sys"."unitTestDontDelete" (
"A" VARCHAR(255),
"B" BIGINT,
"C" DOUBLE,
"D" TIMESTAMP
);
INSERT INTO "sys"."unitTestDontDelete" VALUES (NULL, NULL, NULL, NULL);
INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat1', 0, 0.5, '2013-06-10 11:10:10.000000');
INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat2', 1, 1.5, '2013-06-11 12:11:11.000000');
INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat1', 2, 2.5, '2013-06-12 13:12:12.000000');
INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat2', 3, 3.5, '2013-06-13 14:13:13.000000');
INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat1', 4, 4.5, '2013-06-14 15:14:14.000000');
INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat2', 5, 5.5, '2013-06-15 16:15:15.000000');
INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat1', 6, 6.5, '2013-06-16 17:16:16.000000');
INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat2', 7, 7.5, '2013-06-17 18:17:17.000000');
INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat1', 8, 8.5, '2013-06-18 19:18:18.000000');
The query
with "c3_t" as
(
select
"c1_t"."A",
"c1_t"."B",
"c1_t"."C",
"c1_t"."D"
from
"unitTestDontDelete" as "c1_t"
)
select
(
select
sum("B")
from
"c3_t" as "c4_t"
where
(
("c4_t"."C" >= (coalesce("c3_t"."C", 0.0) + cast('0x1.0p0' as double precision)))
)
)
as "c2_f1"
from
"c3_t"
returns 10 records, which is correct, however the query (clearly equivalent to the first)
with "c3_t" as
(
select
"c1_t"."A",
"c1_t"."B",
"c1_t"."C",
"c1_t"."D"
from
"unitTestDontDelete" as "c1_t"
)
select
(
select
sum("B")
from
"c3_t" as "c4_t"
where
(
("c4_t"."C" >= (coalesce("c3_t"."C", 0.0) + cast('0x1.0p0' as double precision)))
or
( 1 = 0 )
)
)
as "c2_f1"
from
"c3_t"
returns just 9 records. This bug occurs even if the second or condition is not trivial.
Date: 2019-02-18 18:38:35 +0100
From: Manuel <>
To: SQL devs <>
Version: 11.29.7 (Mar2018-SP1)
CC: @njnes
Last updated: 2019-11-28 10:00:06 +0100
Comment 26893
Date: 2019-02-18 18:38:35 +0100
From: Manuel <>
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36
Build Identifier:
With a table created as follows:
CREATE TABLE "sys"."unitTestDontDelete" (
"A" VARCHAR(255),
"B" BIGINT,
"C" DOUBLE,
"D" TIMESTAMP
);
INSERT INTO "sys"."unitTestDontDelete" VALUES (NULL, NULL, NULL, NULL);
INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat1', 0, 0.5, '2013-06-10 11:10:10.000000');
INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat2', 1, 1.5, '2013-06-11 12:11:11.000000');
INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat1', 2, 2.5, '2013-06-12 13:12:12.000000');
INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat2', 3, 3.5, '2013-06-13 14:13:13.000000');
INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat1', 4, 4.5, '2013-06-14 15:14:14.000000');
INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat2', 5, 5.5, '2013-06-15 16:15:15.000000');
INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat1', 6, 6.5, '2013-06-16 17:16:16.000000');
INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat2', 7, 7.5, '2013-06-17 18:17:17.000000');
INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat1', 8, 8.5, '2013-06-18 19:18:18.000000');
The query
with "c3_t" as
(
select
"c1_t"."A",
"c1_t"."B",
"c1_t"."C",
"c1_t"."D"
from
"unitTestDontDelete" as "c1_t"
)
select
(
select
sum("B")
from
"c3_t" as "c4_t"
where
(
("c4_t"."C" >= (coalesce("c3_t"."C", 0.0) + cast('0x1.0p0' as double precision)))
)
)
as "c2_f1"
from
"c3_t"
returns 10 records, which is correct, however the query (clearly equivalent to the first)
with "c3_t" as
(
select
"c1_t"."A",
"c1_t"."B",
"c1_t"."C",
"c1_t"."D"
from
"unitTestDontDelete" as "c1_t"
)
select
(
select
sum("B")
from
"c3_t" as "c4_t"
where
(
("c4_t"."C" >= (coalesce("c3_t"."C", 0.0) + cast('0x1.0p0' as double precision)))
or
( 1 = 0 )
)
)
as "c2_f1"
from
"c3_t"
returns just 9 records. This bug occurs even if the second or condition is not trivial.
Reproducible: Always
Steps to Reproduce:
Actual Results:
Just 9 records
Expected Results:
8 records
Comment 26894
Date: 2019-02-18 18:45:58 +0100
From: Manuel <>
I meant
Expected Results:
10 records
Comment 26900
Date: 2019-02-20 16:52:36 +0100
From: MonetDB Mercurial Repository <>
Changeset 4f140644347c made by Pedro Ferreira pedro.ferreira@monetdbsolutions.com in the MonetDB repo, refers to this bug.
For complete details, see https//devmonetdborg/hg/MonetDB?cmd=changeset;node=4f140644347c
Changeset description:
Comment 26983
Date: 2019-05-01 12:58:35 +0200
From: @njnes
fixed in default, where the subquery implementation is renewed
The text was updated successfully, but these errors were encountered: