From 36fe36d00359ca4d4bb91b72651d70b2bb09e810 Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Tue, 20 Feb 2018 16:59:19 +0300 Subject: [PATCH] updated MergeTreePrewhereRangeReader; renamed MergeTreePrewhereRangeReader to MergeTreeRangeReader --- dbms/src/Storages/MergeTree/MergeTreeBaseBlockInputStream.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dbms/src/Storages/MergeTree/MergeTreeBaseBlockInputStream.cpp b/dbms/src/Storages/MergeTree/MergeTreeBaseBlockInputStream.cpp index 8bd4b469593..c2687a4303a 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeBaseBlockInputStream.cpp +++ b/dbms/src/Storages/MergeTree/MergeTreeBaseBlockInputStream.cpp @@ -142,6 +142,10 @@ Block MergeTreeBaseBlockInputStream::readFromPart() auto read_result = task->range_reader.read(rows_to_read, task->mark_ranges); + /// All rows were filtered. Repeat. + if (read_result.block.rows() == 0) + read_result.block.clear(); + progressImpl({ read_result.block.rows(), read_result.block.bytes() }); if (task->size_predictor)