LuciferYang opened a new pull request, #10085:
URL: https://github.com/apache/paimon/pull/10085

   ### Purpose
   
   close #10084
   
   `BucketSelector.test(partition, bucket, numBucket)` prunes manifest entries 
by the bucket computed from the predicate's bucket-key values. A postpone entry 
of a primary-key table carries bucket `-2` and no bucket count, so the computed 
bucket set never contains `-2` and the entry is dropped. With a bucket-key 
predicate pushed down, a Flink streaming read of a postpone table then silently 
loses all its pending rows.
   
   The manifest-level `mayContain(...)` in the same class already returns 
`true` for a negative bucket or a non-positive bucket count, and the batch 
postpone-merge path avoids the problem by not pushing the key predicate at all. 
Only the entry-level streaming path was missing the guard.
   
   This makes `test(...)` return `true` (cannot prune) when the bucket is 
negative or the bucket count is non-positive, the same condition `mayContain` 
uses. Real buckets are pruned exactly as before.
   
   ### Tests
   
   `BucketSelectorTest#testPostponeBucketIsNeverPruned` asserts that a postpone 
entry (`bucket = -2`) survives both `BucketSelector.test` and the entry-level 
`BucketFilter` used by streaming reads (`onlyReadRealBuckets = false`), while 
every real bucket is still pruned to exactly the selected bucket.
   
   ### API and Format
   
   no
   
   ### Documentation
   
   no
   


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