mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
Merge pull request #56500 from kitaisreal/function-sleep-exception-message-fix
FunctionSleep exception message fix
This commit is contained in:
commit
145468dfd1
@ -112,13 +112,15 @@ public:
|
||||
if (size > 0)
|
||||
{
|
||||
/// When sleeping, the query cannot be cancelled. For ability to cancel query, we limit sleep time.
|
||||
UInt64 microseconds = static_cast<UInt64>(seconds * 1e6);
|
||||
if (max_microseconds && seconds * 1e6 > max_microseconds)
|
||||
throw Exception(ErrorCodes::TOO_SLOW, "The maximum sleep time is {} microseconds. Requested: {}", max_microseconds, seconds);
|
||||
throw Exception(ErrorCodes::TOO_SLOW, "The maximum sleep time is {} microseconds. Requested: {} microseconds",
|
||||
max_microseconds, microseconds);
|
||||
|
||||
if (!dry_run)
|
||||
{
|
||||
UInt64 count = (variant == FunctionSleepVariant::PerBlock ? 1 : size);
|
||||
UInt64 microseconds = static_cast<UInt64>(seconds * count * 1e6);
|
||||
microseconds = static_cast<UInt64>(seconds * count * 1e6);
|
||||
|
||||
if (max_microseconds && microseconds > max_microseconds)
|
||||
throw Exception(ErrorCodes::TOO_SLOW,
|
||||
|
Loading…
Reference in New Issue
Block a user