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

   ### Purpose
   
   Fixes #9819.
   
   Fix `AttributeError: 'NoneType' object has no attribute 'key'` in 
primary-key merge reads when an input reader returns an empty batch after a 
non-empty batch.
   
   Change `Element.update()` to skip empty batches until it finds a record or 
reaches EOF. Return `True` only when a record is available, and close the 
reader at EOF.
   
   ### Tests
   
   Add one regression test with two sorted inputs, including consecutive empty 
batches between records and before EOF. Assert merged output, deduplication, 
and reader closure. The test fails with the reported exception on the unchanged 
baseline and passes with this fix.
   
   Local validation after rebasing onto 
`43e9ad701ebee6d9af8316f35533f4d0836a1fc0`, with Python 3.12.6 and PyArrow 
19.0.1:
   
   - Real local-file reproduction: full scan remains at 6,144 rows; filtered 
scan returns the expected four rows and values.
   - All 59 selected tests passed: the new regression and existing 
sequence-field, primary-key reader, predicate reader, and merge-engine dispatch 
tests.
   - Changed-file flake8, license headers, and `git diff --check` passed.
   
   The full CI matrix has not been run locally.
   


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