diff --git a/dbms/src/DataStreams/LimitBlockInputStream.cpp b/dbms/src/DataStreams/LimitBlockInputStream.cpp index ea794425bae..276f2c6ee41 100644 --- a/dbms/src/DataStreams/LimitBlockInputStream.cpp +++ b/dbms/src/DataStreams/LimitBlockInputStream.cpp @@ -143,7 +143,7 @@ Block LimitBlockInputStream::readImpl() } } - if (start + length == rows) + if (length == rows) return *ptr; for (size_t i = 0; i < ptr->columns(); ++i)