mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-03 21:12:28 +00:00
fix uncaught exception
This commit is contained in:
parent
00f1659601
commit
42df6591aa
@ -302,10 +302,11 @@ struct ScatteredBlock : private boost::noncopyable
|
||||
/// Cut first `num_rows` rows from `block` in place and returns block with remaining rows
|
||||
ScatteredBlock cut(size_t num_rows)
|
||||
{
|
||||
SCOPE_EXIT(filterBySelector());
|
||||
|
||||
if (num_rows >= rows())
|
||||
{
|
||||
filterBySelector();
|
||||
return ScatteredBlock{Block{}};
|
||||
}
|
||||
|
||||
chassert(block);
|
||||
|
||||
@ -314,6 +315,7 @@ struct ScatteredBlock : private boost::noncopyable
|
||||
auto remaining = ScatteredBlock{block, std::move(remaining_selector)};
|
||||
|
||||
selector = std::move(first_num_rows);
|
||||
filterBySelector();
|
||||
|
||||
return remaining;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user