Fixed tests

This commit is contained in:
Maksim Kita 2020-12-08 13:54:33 +03:00
parent 16a30eb4aa
commit 17b43ca721
7 changed files with 33 additions and 17 deletions

View File

@ -226,7 +226,7 @@ struct ConvertImpl
{ {
if constexpr (std::is_same_v<Additions, AccurateOrNullConvertStrategyAdditions>) if constexpr (std::is_same_v<Additions, AccurateOrNullConvertStrategyAdditions>)
{ {
vec_null_map_to[i] = true; (*vec_null_map_to)[i] = true;
continue; continue;
} }
else else

View File

@ -18,3 +18,13 @@
1.000000000 1.000000000
\N \N
\N \N
\N
\N
\N
\N
\N
\N
\N
\N
\N
\N

View File

@ -21,3 +21,15 @@ SELECT accurateCastOrNull(1, 'Decimal32(9)');
SELECT accurateCastOrNull(-10, 'Decimal32(9)'); SELECT accurateCastOrNull(-10, 'Decimal32(9)');
SELECT accurateCastOrNull('123', 'FixedString(2)'); SELECT accurateCastOrNull('123', 'FixedString(2)');
SELECT accurateCastOrNull(inf, 'Int64');
SELECT accurateCastOrNull(inf, 'Int128');
SELECT accurateCastOrNull(inf, 'Int256');
SELECT accurateCastOrNull(nan, 'Int64');
SELECT accurateCastOrNull(nan, 'Int128');
SELECT accurateCastOrNull(nan, 'Int256');
SELECT accurateCastOrNull(inf, 'UInt64');
SELECT accurateCastOrNull(inf, 'UInt256');
SELECT accurateCastOrNull(nan, 'UInt64');
SELECT accurateCastOrNull(nan, 'UInt256');

View File

@ -1,6 +0,0 @@
-9223372036854775808
170141183460469231731687303715884105727
-9223372036854775808
170141183460469231731687303715884105727
0
0

View File

@ -1,10 +0,0 @@
SELECT toInt64(inf);
SELECT toInt128(inf);
SELECT toInt256(inf); -- { serverError 48 }
SELECT toInt64(nan);
SELECT toInt128(nan);
SELECT toInt256(nan); -- { serverError 48 }
SELECT toUInt64(inf);
SELECT toUInt256(inf); -- { serverError 48 }
SELECT toUInt64(nan);
SELECT toUInt256(nan); -- { serverError 48 }

View File

@ -0,0 +1,10 @@
SELECT toInt64(inf); -- { serverError 70 }
SELECT toInt128(inf); -- { serverError 70 }
SELECT toInt256(inf); -- { serverError 70 }
SELECT toInt64(nan); -- { serverError 70 }
SELECT toInt128(nan); -- { serverError 70 }
SELECT toInt256(nan); -- { serverError 70 }
SELECT toUInt64(inf); -- { serverError 70 }
SELECT toUInt256(inf); -- { serverError 70 }
SELECT toUInt64(nan); -- { serverError 70 }
SELECT toUInt256(nan); -- { serverError 70 }