mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-19 16:20:50 +00:00
Verify that there are no intersecting parts in the resulting all_parts_to_read
This commit is contained in:
parent
e13247b67e
commit
aba7de5091
@ -911,6 +911,24 @@ void InOrderCoordinator<mode>::doHandleInitialAllRangesAnnouncement(InitialAllRa
|
|||||||
std::sort(ranges.begin(), ranges.end());
|
std::sort(ranges.begin(), ranges.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
|
/// Double check that there are no intersecting parts
|
||||||
|
{
|
||||||
|
auto part_it = all_parts_to_read.begin();
|
||||||
|
auto next_part_it = part_it;
|
||||||
|
if (next_part_it != all_parts_to_read.end())
|
||||||
|
++next_part_it;
|
||||||
|
while (next_part_it != all_parts_to_read.end())
|
||||||
|
{
|
||||||
|
chassert(part_it->description.info.isDisjoint(next_part_it->description.info),
|
||||||
|
fmt::format("Parts {} and {} intersect",
|
||||||
|
part_it->description.info.getPartNameV1(), next_part_it->description.info.getPartNameV1()));
|
||||||
|
++part_it;
|
||||||
|
++next_part_it;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
state_initialized = true;
|
state_initialized = true;
|
||||||
|
|
||||||
// progress_callback is not set when local plan is used for initiator
|
// progress_callback is not set when local plan is used for initiator
|
||||||
|
Loading…
Reference in New Issue
Block a user