should be it

This commit is contained in:
2025-10-24 19:21:19 -05:00
parent a4b23fc57c
commit f09560c7b1
14047 changed files with 3161551 additions and 1 deletions

View File

@@ -0,0 +1,32 @@
# name: test/fuzzer/sqlsmith/interval_diff_overflow.test
# description: Overflow in interval part subtraction
# group: [sqlsmith]
statement ok
create table all_types as
select * exclude(small_enum, medium_enum, large_enum)
from test_all_types();
statement error
SELECT subtract(
CAST(main.all_types."interval" AS INTERVAL),
CAST(to_months(CAST(main.all_types."int" AS INTEGER)) AS INTERVAL))
FROM main.all_types
----
Out of Range Error: Interval months subtraction out of range
statement error
SELECT subtract(
CAST(main.all_types."interval" AS INTERVAL),
CAST(to_days(CAST(main.all_types."int" AS INTEGER)) AS INTERVAL))
FROM main.all_types
----
Out of Range Error: Interval days subtraction out of range
statement error
SELECT subtract(
CAST(main.all_types."interval" AS INTERVAL),
CAST(to_microseconds(CAST(main.all_types."bigint" AS BIGINT)) AS INTERVAL))
FROM main.all_types
----
Out of Range Error: Interval micros subtraction out of range