mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-21 09:10:48 +00:00
dbms: fixed exception message [#METR-19516].
This commit is contained in:
parent
9177841f1b
commit
3f6eb904d6
@ -151,8 +151,7 @@ void IProfilingBlockInputStream::updateExtremes(Block & block)
|
||||
bool IProfilingBlockInputStream::checkLimits()
|
||||
{
|
||||
/// Проверка ограничений.
|
||||
if ((limits.max_rows_to_read && info.rows > limits.max_rows_to_read)
|
||||
|| (limits.max_bytes_to_read && info.bytes > limits.max_bytes_to_read))
|
||||
if (limits.max_rows_to_read && info.rows > limits.max_rows_to_read)
|
||||
{
|
||||
if (limits.read_overflow_mode == OverflowMode::THROW)
|
||||
throw Exception(std::string("Limit for ")
|
||||
@ -167,6 +166,21 @@ bool IProfilingBlockInputStream::checkLimits()
|
||||
throw Exception("Logical error: unknown overflow mode", ErrorCodes::LOGICAL_ERROR);
|
||||
}
|
||||
|
||||
if (limits.max_bytes_to_read && info.bytes > limits.max_bytes_to_read)
|
||||
{
|
||||
if (limits.read_overflow_mode == OverflowMode::THROW)
|
||||
throw Exception(std::string("Limit for ")
|
||||
+ (limits.mode == LIMITS_CURRENT ? "result bytes (uncompressed)" : "(uncompressed) bytes to read")
|
||||
+ " exceeded: read " + toString(info.bytes)
|
||||
+ " bytes, maximum: " + toString(limits.max_bytes_to_read),
|
||||
ErrorCodes::TOO_MUCH_ROWS);
|
||||
|
||||
if (limits.read_overflow_mode == OverflowMode::BREAK)
|
||||
return false;
|
||||
|
||||
throw Exception("Logical error: unknown overflow mode", ErrorCodes::LOGICAL_ERROR);
|
||||
}
|
||||
|
||||
if (limits.max_execution_time != 0
|
||||
&& info.total_stopwatch.elapsed() > static_cast<UInt64>(limits.max_execution_time.totalMicroseconds()) * 1000)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user