JingsongLi commented on code in PR #374:
URL: https://github.com/apache/paimon-rust/pull/374#discussion_r3394265144
##########
crates/paimon/src/table/table_scan.rs:
##########
@@ -721,6 +740,14 @@ impl<'a> TableScan<'a> {
}
result
+ } else if let Some(ref comparator) = pk_comparator {
+ // Merge-tree path: section files by key-range overlap first,
then
+ // bin-pack whole sections. Overlapping files always share a
split.
+ pack_sections(
Review Comment:
This branch can make `merged_row_count()` overestimate rows for PK tables:
once overlapping files are packed into the same split,
`DataSplit::merged_row_count()` still falls back to summing the physical
`row_count`s because these files have no `first_row_id`. If a LIMIT hint is
pushed down, `apply_limit_pushdown` can stop after this split even though the
sort-merge reader later collapses those versions to fewer logical rows, so
queries can return fewer rows than the requested LIMIT. Could we disable limit
split pruning for merge-tree packed PK scans (or teach `merged_row_count` to
return unknown for these splits)?
--
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]