diff --git a/src/DataStreams/IBlockInputStream.cpp b/src/DataStreams/IBlockInputStream.cpp index 94f7544480a..e954225fdf9 100644 --- a/src/DataStreams/IBlockInputStream.cpp +++ b/src/DataStreams/IBlockInputStream.cpp @@ -63,7 +63,7 @@ Block IBlockInputStream::read() if (enabled_extremes) updateExtremes(res); - if (limits.mode == LIMITS_CURRENT && !limits.size_limits.check(info.rows, info.bytes, "result", ErrorCodes::TOO_MANY_ROWS_OR_BYTES)) + if (limits.mode == LimitsMode::LIMITS_CURRENT && !limits.size_limits.check(info.rows, info.bytes, "result", ErrorCodes::TOO_MANY_ROWS_OR_BYTES)) limit_exceeded_need_break = true; if (quota) @@ -209,11 +209,11 @@ void IBlockInputStream::checkQuota(Block & block) { switch (limits.mode) { - case LIMITS_TOTAL: + case LimitsMode::LIMITS_TOTAL: /// Checked in `progress` method. break; - case LIMITS_CURRENT: + case LimitsMode::LIMITS_CURRENT: { UInt64 total_elapsed = info.total_stopwatch.elapsedNanoseconds(); quota->used({Quota::RESULT_ROWS, block.rows()}, {Quota::RESULT_BYTES, block.bytes()}, {Quota::EXECUTION_TIME, total_elapsed - prev_elapsed}); @@ -242,7 +242,7 @@ void IBlockInputStream::progressImpl(const Progress & value) /** Check the restrictions on the amount of data to read, the speed of the query, the quota on the amount of data to read. * NOTE: Maybe it makes sense to have them checked directly in ProcessList? */ - if (limits.mode == LIMITS_TOTAL) + if (limits.mode == LimitsMode::LIMITS_TOTAL) { if (!limits.size_limits.check(total_rows_estimate, progress.read_bytes, "rows to read", ErrorCodes::TOO_MANY_ROWS, ErrorCodes::TOO_MANY_BYTES)) @@ -262,7 +262,7 @@ void IBlockInputStream::progressImpl(const Progress & value) limits.speed_limits.throttle(progress.read_rows, progress.read_bytes, total_rows, total_elapsed_microseconds); - if (quota && limits.mode == LIMITS_TOTAL) + if (quota && limits.mode == LimitsMode::LIMITS_TOTAL) quota->used({Quota::READ_ROWS, value.read_rows}, {Quota::READ_BYTES, value.read_bytes}); }