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

   ### Purpose
   
   Daft `PaimonDataSink.write()` previously always called `table_write.close()` 
in a `finally` block. `close()` may flush and close writers, but it does not 
remove uncommitted files. If a later micropartition failed after an earlier one 
had produced data files, the failed write could leave orphan files.
   
   This changes the worker write path to close only after `prepare_commit()` 
succeeds, and to call `table_write.abort()` on exceptions before re-raising. It 
also adds a regression test for a valid micropartition followed by a 
schema-mismatched micropartition, verifying no data files remain.
   
   ### Tests
   
     - `python -m pytest paimon-python/pypaimon/tests/daft/daft_sink_test.py`
   


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