fixed reading with zero max block size setting

This commit is contained in:
Nikolai Kochetov 2017-07-11 21:54:47 +03:00 committed by alexey-milovidov
parent e2d032b883
commit 546012079c

View File

@ -84,7 +84,7 @@ Block MergeTreeBaseBlockInputStream::readFromPart()
MergeTreeReadTask & task, MergeTreeRangeReader & reader)
{
if (!task.size_predictor)
return std::max(1, max_block_size_rows);
return std::max<size_t>(1, max_block_size_rows);
size_t rows_to_read_for_block = task.size_predictor->estimateNumRows(preferred_block_size_bytes);
size_t rows_to_read_for_max_size_column