Files
email-tracker/external/duckdb/test/fuzzer/sqlsmith/test_abs_overflow.test
2025-10-24 19:21:19 -05:00

25 lines
500 B
SQL

# name: test/fuzzer/sqlsmith/test_abs_overflow.test
# description: Fuzzer #29: test abs overflow
# group: [sqlsmith]
statement ok
PRAGMA enable_verification
# test abs function on extremes
statement ok
CREATE TABLE numerics AS SELECT tinyint, smallint, int, bigint, hugeint FROM test_all_types();
foreach type tinyint smallint int bigint hugeint
statement error
SELECT abs(${type}) FROM numerics;
----
Overflow on abs
statement ok
SELECT abs(${type}) FROM numerics WHERE ${type} > 0;
endloop