jackylee-ch commented on PR #946:
URL: https://github.com/apache/paimon-rust/pull/946#issuecomment-5912060388

   Addressed both points.
   
   **Negative limit.** `ReadBuilder.WithLimit` now rejects a negative `int` up 
front with `ErrNegativeLimit`, before the `uintptr` cast, so it can no longer 
wrap to a huge value and make `LimitPushdownAccumulator` stop after the first 
split. `TestReadBuilderWithLimitRejectsNegative` asserts the distinct 
`ErrNegativeLimit` (not `ErrClosed`) on a zero-value builder, which pins that 
the reject arm runs ahead of the closed-builder guard. It is non-vacuous: 
removing the guard makes the test fail with `got paimon: use of closed 
resource`.
   
   **Narrower performance claim.** The `WithLimit` doc and the PR description 
no longer say the hint avoids reading statistics; planning still reads the 
manifest entries to learn each split's row count, so the hint only bounds how 
many splits are retained.
   
   **Multiple known-count splits.** 
`test_read_builder_with_limit_prunes_plan_splits` now plans several splits — a 
tiny `source.split.target-size` keeps each committed file as its own split — 
and asserts the hint threads through the C FFI across them: a zero limit prunes 
them all, a small limit retains a strict non-empty subset, and a large limit 
retains every split. The accumulator behavior your probe hit is also covered 
directly at `LimitPushdownAccumulator` 
(`test_incremental_limit_accumulator_stops_after_known_count_reaches_limit`, 
`test_apply_limit_pushdown_returns_all_when_limit_not_reached`).
   
   Rebased onto current main. `paimon-c` (83 tests) passes; `go vet` is clean 
and the non-warehouse Go tests pass; `clippy -p paimon-c --all-targets -D 
warnings` is clean.
   


-- 
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]

Reply via email to