Changeset: 12ffafd9a2b6 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=12ffafd9a2b6
Modified Files:
        sql/test/BugTracker-2020/Tests/interval-math.Bug-6935.sql
        sql/test/BugTracker-2020/Tests/interval-math.Bug-6935.stable.out
Branch: typing
Log Message:

Test for null values


diffs (47 lines):

diff --git a/sql/test/BugTracker-2020/Tests/interval-math.Bug-6935.sql 
b/sql/test/BugTracker-2020/Tests/interval-math.Bug-6935.sql
--- a/sql/test/BugTracker-2020/Tests/interval-math.Bug-6935.sql
+++ b/sql/test/BugTracker-2020/Tests/interval-math.Bug-6935.sql
@@ -53,3 +53,9 @@ SELECT x, y, x / y from (values(interval
 
 SELECT x, y, x * y from (values(interval '0' month),(interval '-3' 
month),(interval '6' month)) as x(x), (values(cast(1.1 as double)),(cast(3.4 as 
real)),(cast(-7 as double))) as y(y);
 SELECT x, y, x / y from (values(interval '0' second),(interval '-56' 
day),(interval '67' minute)) as x(x), (values(cast(1.1 as double)),(cast(3.4 as 
real)),(cast(-7 as double))) as y(y);
+
+SELECT INTERVAL '1' MONTH / cast(NULL as real);
+SELECT cast(NULL as INTERVAL YEAR) * cast(1.0 as double);
+
+SELECT cast(NULL as INTERVAL SECOND)/ cast(1.664 as real);
+SELECT cast(1.77 as double) * cast(NULL as INTERVAL MINUTE);
diff --git a/sql/test/BugTracker-2020/Tests/interval-math.Bug-6935.stable.out 
b/sql/test/BugTracker-2020/Tests/interval-math.Bug-6935.stable.out
--- a/sql/test/BugTracker-2020/Tests/interval-math.Bug-6935.stable.out
+++ b/sql/test/BugTracker-2020/Tests/interval-math.Bug-6935.stable.out
@@ -271,6 +271,30 @@ stdout of test 'interval-math.Bug-6935` 
 [ 4020.000,    1.1,    3654.545        ]
 [ 4020.000,    3.400000095,    1182.353        ]
 [ 4020.000,    -7,     -574.286        ]
+#SELECT INTERVAL '1' MONTH / cast(NULL as real);
+% .%2 # table_name
+% %2 # name
+% month_interval # type
+% 1 # length
+[ NULL ]
+#SELECT cast(NULL as INTERVAL MONTH) * cast(1.0 as double);
+% .%2 # table_name
+% %2 # name
+% month_interval # type
+% 1 # length
+[ NULL ]
+#SELECT cast(NULL as INTERVAL SECOND)/ cast(1.664 as real);
+% .%2 # table_name
+% %2 # name
+% sec_interval # type
+% 5 # length
+[ NULL ]
+#SELECT cast(1.77 as double) * cast(NULL as INTERVAL SECOND);
+% .%2 # table_name
+% %2 # name
+% sec_interval # type
+% 5 # length
+[ NULL ]
 
 # 10:13:31 >  
 # 10:13:31 >  "Done."
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to