Changeset: ebbbf24a2dee for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/ebbbf24a2dee
Added Files:
        sql/test/BugTracker-2024/Tests/7580-date-diff.test
Modified Files:
        sql/test/BugTracker-2024/Tests/All
Branch: Aug2024
Log Message:

add test for issue #7580


diffs (23 lines):

diff --git a/sql/test/BugTracker-2024/Tests/7580-date-diff.test 
b/sql/test/BugTracker-2024/Tests/7580-date-diff.test
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2024/Tests/7580-date-diff.test
@@ -0,0 +1,10 @@
+
+query IIIIII
+select t.d1, t.d2
+, cast(extract(day from (t.d1 - t.d2)) as integer) as verschil
+, cast(extract(day from (t.d1 - t.d2)) as integer) < 100 as f -- false
+, cast(extract(day from (t.d1 - t.d2)) as integer) >=100 as t -- true
+, case when cast(extract(day from (t.d1 - t.d2)) as integer) < 100 then 
'false' else 'true' end as true_or_false -- false
+from (select cast('2024-01-18' as date) as d1, cast('2013-06-06' as date) as 
d2) t
+where abs(cast(extract(day from (t.d1 - t.d2)) as integer)) < 100 -- this is 
false, not true, so this shouldn't produce any result.
+----
diff --git a/sql/test/BugTracker-2024/Tests/All 
b/sql/test/BugTracker-2024/Tests/All
--- a/sql/test/BugTracker-2024/Tests/All
+++ b/sql/test/BugTracker-2024/Tests/All
@@ -90,3 +90,4 @@ 7563-is-distinct-from
 7572-max-length-changes
 7570-timestamp-str
 7574-startswith-bug
+7580-date-diff
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to