91.58% (185/202) Uncovered changed code (with context): ================================================================================ src/Processors/Merges/IMergingTransform.cpp ================================================================================ --- uncovered block 220-220 --- 218 | const auto & input_chunk = state.input_chunk.chunk; 219 | if (!input_chunk.hasRows() && !isVirtualRow(input_chunk) && !input.isFinished()) >> 220 | return Status::NeedData; 221 | 222 | state.has_input = true; ================================================================================ src/Processors/QueryPlan/BufferChunksTransform.cpp ================================================================================ --- uncovered block 48-52 --- 46 | 47 | if (isVirtualRow(chunk)) >> 48 | { >> 49 | output.push(std::move(chunk)); >> 50 | input.setNotNeeded(); >> 51 | return Status::PortFull; >> 52 | } 53 | 54 | num_buffered_rows -= chunk.getNumRows(); --- uncovered block 77-81 --- 75 | auto chunk = pullChunk(virtual_row); 76 | if (virtual_row) >> 77 | { >> 78 | chunks.push(std::move(chunk)); >> 79 | input.setNotNeeded(); >> 80 | return Status::PortFull; >> 81 | } 82 | num_buffered_rows += chunk.getNumRows(); 83 | num_buffered_bytes += chunk.bytes(); ================================================================================ src/Processors/QueryPlan/SortingStep.cpp ================================================================================ --- uncovered block 524-526 --- 522 | } 523 | else if (apply_virtual_row_conversions) >> 524 | { >> 525 | pipeline.addSimpleTransform(RemoveVirtualRowTransform::create); >> 526 | } 527 | } 528 | ================================================================================ src/Storages/MergeTree/MergeTreeSelectProcessor.cpp ================================================================================ --- uncovered block 285-285 --- 283 | { 284 | if (!virtual_row_conversions || read_mark_ranges.empty()) >> 285 | return {}; 286 | 287 | const auto & data_part = current_task.getInfo().data_part; --- uncovered block 300-300 --- 298 | size_t num_pk_columns = pk_block_header.columns(); 299 | if (index->size() < num_pk_columns) >> 300 | return {}; 301 | 302 | bool has_value = std::ranges::all_of(*index, [&](const auto & col) { return col->size() > next_mark; }); --- uncovered block 304-304 --- 302 | bool has_value = std::ranges::all_of(*index, [&](const auto & col) { return col->size() > next_mark; }); 303 | if (!has_value) >> 304 | return {}; 305 | 306 | ColumnsWithTypeAndName pk_columns; === Lost Baseline Coverage: 7 lines === ================================================================================ src/Processors/Merges/IMergingTransform.cpp ================================================================================ --- lost coverage block 123-126 --- 121 | { 122 | if (!input.isFinished()) >> 123 | { >> 124 | input.setNeeded(); >> 125 | all_inputs_has_data = false; >> 126 | } 127 | 128 | continue; ================================================================================ src/Processors/QueryPlan/SortingStep.cpp ================================================================================ --- lost coverage block 382-382 --- 380 | if (pipeline.getNumStreams() > 1) 381 | { >> 382 | /// Disable buffering when `read_in_order_use_virtual_row_per_block` is enabled, these optimizations are incompatible. 383 | /// Buffering would need to flush virtual rows, otherwise virtual rows lose their purpose while reading from the stream. 384 | /// But flushing a virtual row between every block effectively turns buffering into a no-op. ================================================================================ src/Storages/MergeTree/MergeTreeSelectProcessor.cpp ================================================================================ --- lost coverage block 269-269 --- 267 | if (reader_settings.use_query_condition_cache && prewhere_info) 268 | current_task.addPrewhereUnmatchedMarks(res.read_mark_ranges); >> 269 | 270 | return {Chunk(), res.num_read_rows, res.num_read_bytes, false, std::move(res.read_mark_ranges)}; 271 | } --- lost coverage block 390-390 --- 388 | 389 | /// Emit a virtual row update after each block, carrying the next mark's PK boundary. >> 390 | /// This allows MergingSortedTransform to reprioritize sources when: 391 | /// - PREWHERE filters all rows (merge gets updated position without actual data) 392 | /// - A downstream filter (WHERE, JOIN) removes all rows (virtual row passes through filters) WARNING: Failed to get start time for [Print Uncovered Code] - start time and duration won't be set --- Coverage counts --- Lines : baseline 742,429/883,512 → current 742,687/883,611 (Δ +258 / +99) Functions : baseline 798,976/879,291 → current 799,151/879,426 (Δ +175 / +135) Branches : baseline 240,940/314,792 → current 241,087/314,850 (Δ +147 / +58)