From 1b618fd130b31f6cbeda910fcbd655a29dab08d8 Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Mon, 14 Sep 2020 23:56:56 +0300 Subject: [PATCH] Fix build --- src/DataStreams/IBlockInputStream.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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}); }