mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
Update tests
This commit is contained in:
parent
1f2226b9db
commit
d369da6643
@ -185,6 +185,10 @@ public:
|
|||||||
/// Conversion of infinite values to integer is undefined.
|
/// Conversion of infinite values to integer is undefined.
|
||||||
throw Exception("Cannot convert infinite value to integer type", ErrorCodes::CANNOT_CONVERT_TYPE);
|
throw Exception("Cannot convert infinite value to integer type", ErrorCodes::CANNOT_CONVERT_TYPE);
|
||||||
}
|
}
|
||||||
|
else if (x > std::numeric_limits<T>::max() || x < std::numeric_limits<T>::lowest())
|
||||||
|
{
|
||||||
|
throw Exception("Cannot convert out of range floating point value to integer type", ErrorCodes::CANNOT_CONVERT_TYPE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if constexpr (std::is_same_v<Decimal256, T>)
|
if constexpr (std::is_same_v<Decimal256, T>)
|
||||||
@ -193,9 +197,6 @@ public:
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (x > std::numeric_limits<T>::max() || x < std::numeric_limits<T>::lowest())
|
|
||||||
throw Exception("Cannot convert out of range floating point value to integer type", ErrorCodes::CANNOT_CONVERT_TYPE);
|
|
||||||
|
|
||||||
return T(x);
|
return T(x);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ SETTINGS index_granularity = 8192;
|
|||||||
INSERT INTO t0 VALUES (0, 0);
|
INSERT INTO t0 VALUES (0, 0);
|
||||||
|
|
||||||
SELECT t0.c1 FROM t0 WHERE NOT (t0.c1 OR (t0.c0 AND -1524532316));
|
SELECT t0.c1 FROM t0 WHERE NOT (t0.c1 OR (t0.c0 AND -1524532316));
|
||||||
SELECT t0.c1 FROM t0 WHERE NOT (t0.c1 OR (t0.c0 AND -1.0));
|
SELECT t0.c1 FROM t0 WHERE NOT (t0.c1 OR (t0.c0 AND -1.0)); -- { serverError 70 }
|
||||||
SELECT t0.c1 FROM t0 WHERE NOT (t0.c1 OR (t0.c0 AND inf));
|
SELECT t0.c1 FROM t0 WHERE NOT (t0.c1 OR (t0.c0 AND inf));
|
||||||
SELECT t0.c1 FROM t0 WHERE NOT (t0.c1 OR (t0.c0 AND nan));
|
SELECT t0.c1 FROM t0 WHERE NOT (t0.c1 OR (t0.c0 AND nan));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user