This commit is contained in:
jsc0218 2024-05-04 17:37:56 +00:00
parent 55d13b075d
commit 04a757eb71
2 changed files with 4 additions and 3 deletions

View File

@ -234,7 +234,7 @@ IMergingAlgorithm::Status MergingSortedAlgorithm::mergeBatchImpl(TSortingQueue &
{ {
/// If virtual row is detected, there should be only one row as a single chunk, /// If virtual row is detected, there should be only one row as a single chunk,
/// and always skip this chunk to pull the next one. /// and always skip this chunk to pull the next one.
assert(initial_batch_size == 1); chassert(initial_batch_size == 1);
queue.removeTop(); queue.removeTop();
return Status(current.impl->order); return Status(current.impl->order);
} }

View File

@ -598,8 +598,9 @@ Pipe ReadFromMergeTree::readInOrder(
processor->addPartLevelToChunk(isQueryWithFinal()); processor->addPartLevelToChunk(isQueryWithFinal());
processor->addVirtualRowToChunk(need_virtual_row, part_with_ranges.data_part->getIndex(), auto primary_key_index = part_with_ranges.data_part->getIndex();
part_with_ranges.ranges.front().begin); chassert(primary_key_index);
processor->addVirtualRowToChunk(need_virtual_row, *primary_key_index, part_with_ranges.ranges.front().begin);
auto source = std::make_shared<MergeTreeSource>(std::move(processor)); auto source = std::make_shared<MergeTreeSource>(std::move(processor));
if (set_rows_approx) if (set_rows_approx)