mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-30 19:42:00 +00:00
Merge pull request #72405 from ClickHouse/fix_uncaught_exc
Fix uncaught exception in ScatteredBlock
This commit is contained in:
commit
cb2249e4a6
@ -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