diff --git a/tests/queries/0_stateless/01906_bigint_accurate_cast_ubsan.reference b/tests/queries/0_stateless/01906_bigint_accurate_cast_ubsan.reference new file mode 100644 index 00000000000..a293d9344f8 --- /dev/null +++ b/tests/queries/0_stateless/01906_bigint_accurate_cast_ubsan.reference @@ -0,0 +1,5 @@ +10000000000000000000 +10000000000000000000 +10000000000000000000 +10000000000000000000 +10000000000000000000 diff --git a/tests/queries/0_stateless/01906_bigint_accurate_cast_ubsan.sql b/tests/queries/0_stateless/01906_bigint_accurate_cast_ubsan.sql new file mode 100644 index 00000000000..4b9fa9662a9 --- /dev/null +++ b/tests/queries/0_stateless/01906_bigint_accurate_cast_ubsan.sql @@ -0,0 +1,15 @@ +SELECT accurateCast(1e35, 'UInt32'); -- { serverError 70 } +SELECT accurateCast(1e35, 'UInt64'); -- { serverError 70 } +SELECT accurateCast(1e35, 'UInt128'); -- { serverError 70 } +SELECT accurateCast(1e35, 'UInt256'); -- { serverError 70 } + +SELECT accurateCast(1e19, 'UInt64'); +SELECT accurateCast(1e19, 'UInt128'); +SELECT accurateCast(1e19, 'UInt256'); +SELECT accurateCast(1e20, 'UInt64'); -- { serverError 70 } +SELECT accurateCast(1e20, 'UInt128'); -- { serverError 70 } +SELECT accurateCast(1e20, 'UInt256'); -- { serverError 70 } + +SELECT accurateCast(1e19, 'Int64'); -- { serverError 70 } +SELECT accurateCast(1e19, 'Int128'); +SELECT accurateCast(1e19, 'Int256');