fix tests

This commit is contained in:
Albert Kidrachev 2020-05-27 18:38:29 +03:00
parent fedf1f5dd2
commit c38caafe93

View File

@ -81,7 +81,7 @@ void PartialSortingTransform::transform(Chunk & chunk)
sortBlock(block, description, limit);
if (limit && limit < rows_num &&
if (limit && limit < block.rows() &&
(threshold_block_columns.empty() || less(block_columns, limit - 1, threshold_block_columns, limit - 1, description)))
{
threshold_block = block.cloneWithColumns(block.getColumns());