JeonDaehong commented on code in PR #1164:
URL: https://github.com/apache/paimon-rust/pull/1164#discussion_r4348871229
##########
crates/paimon/src/table/kv_file_reader.rs:
##########
@@ -711,6 +761,18 @@ impl KeyValueFileReader {
.map(|budget| Arc::new(budget.without_prefetch()))
};
let mut file_streams: Vec<ArrowRecordBatchStream> =
Vec::new();
+ // One sorted run never repeats a key, so under these
engines
+ // every key is a lone version and needs no merge. Retract
+ // rows are still dropped per batch below: older Rust
writers
+ // recorded `delete_row_count = 0` for files holding them.
+ let skip_merge = skip_single_runs
Review Comment:
Thanks for reproducing it (ca5eb6f). The shortcut now also checks the schema
each file was written with, and only skips the merge when that schema's merge
engine is deduplicate or first-row. If a file comes from the aggregation
schema, the section merges as before. I added the aggregation → deduplicate
ALTER case with a two-version file. Without the check it returns key 1 twice,
now `(1, 11)` and `(2, 20)`.
Same clippy note as on #1145: the unused `BinaryRow` import in
`table_upsert.rs` comes from #1198.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]