Free chunks when merge sort is finished at MergeSorter.

This commit is contained in:
Nikolai Kochetov 2019-05-13 17:57:49 +03:00
parent ba6768557e
commit 6a781cf2c8

View File

@ -222,6 +222,8 @@ Chunk MergeSorter::mergeImpl(std::priority_queue<TSortCursor> & queue)
return Chunk(std::move(merged_columns), merged_rows);
}
chunks.clear();
if (merged_rows == 0)
return {};