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
User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:16.0) Gecko/20100101 Firefox/16.0
Build Identifier:
sql> SELECT CASE WHEN TRUE THEN -10. ELSE 0/0 END;
division by zero.
but
sql>
sql>SELECT CASE WHEN TRUE THEN -10 ELSE 0/0 END;
+---------------------+
| isnull_single_value |
+=====================+
| -10 |
+---------------------+
1 tuple (1.992ms)
Reproducible: Always
Actual Results:
division by zero
Expected Results:
same result for the int case
We use this on tables where we check if a value c2 is less than 10^{-6}. If so we print 10.0 else c1/c2.
Date: 2012-11-16 12:11:58 +0100
From: @bartscheers
To: SQL devs <>
Version: 11.13.3 (Oct2012)
CC: @njnes
Last updated: 2013-01-22 09:29:11 +0100
Comment 17946
Date: 2012-11-16 12:11:58 +0100
From: @bartscheers
User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:16.0) Gecko/20100101 Firefox/16.0
Build Identifier:
sql> SELECT CASE WHEN TRUE THEN -10. ELSE 0/0 END;
division by zero.
but
sql>
sql>SELECT CASE WHEN TRUE THEN -10 ELSE 0/0 END;
+---------------------+
| isnull_single_value |
+=====================+
| -10 |
+---------------------+
1 tuple (1.992ms)
Reproducible: Always
Actual Results:
division by zero
Expected Results:
same result for the int case
We use this on tables where we check if a value c2 is less than 10^{-6}. If so we print 10.0 else c1/c2.
Comment 17947
Date: 2012-11-16 12:23:40 +0100
From: @bartscheers
A work around would be
SELECT coalesce (CASE WHEN TRUE THEN -10. end, case when false then 0/0 END);
Comment 17994
Date: 2012-11-24 17:10:57 +0100
From: @njnes
added test case_evaluated_too_early.Bug-3186.sql
fixed exp_case_fixup to also handle this case
Comment 17995
Date: 2012-11-24 17:11:52 +0100
From: @njnes
Changeset 1a10469e62a2 made by Niels Nes niels@cwi.nl in the MonetDB repo, refers to this bug.
For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=1a10469e62a2
Changeset description:
Comment 18370
Date: 2013-01-22 09:29:11 +0100
From: @sjoerdmullender
Oct2012-SP3 has been released.
The text was updated successfully, but these errors were encountered: