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

   ## Summary
   
   PyPaimon can deserialize `Snapshot.properties`, but its table commit API has 
no way to populate them. Java supports the same capability through 
`ManifestCommittable.addProperty`. This PR closes that gap so Python 
applications can atomically publish recovery or checkpoint state with the data 
represented by the snapshot, instead of maintaining an inconsistent sidecar.
   
   The direct LeRobot capture writer in #9665 is the first consumer: it uses 
the properties to resume global frame, episode, and task indices without 
scanning the table.
   
   ## Changes
   
   - Add an optional `snapshot_properties` mapping to batch and stream table 
commits.
   - Preserve the properties through append, overwrite, conflict retry, and 
snapshot creation.
   - Keep existing callers unchanged when the argument is omitted and serialize 
an empty mapping as no snapshot properties, matching Java behavior.
   
   ## Testing
   
   - Batch commits persist the supplied properties in the latest snapshot.
   - Stream commits persist checkpoint properties in the latest snapshot.
   - Batch, stream, and overwrite paths forward the properties to the 
file-store commit layer.
   - `python -m pytest -q pypaimon/tests/table_commit_test.py 
pypaimon/tests/table/simple_table_test.py` (28 passed).
   - Ruff and `git diff --check` pass for all changed files.
   
   ## Notes
   
   An empty append still does not create a snapshot solely for properties. This 
PR adds properties to snapshots produced by data commits; it does not add 
metadata-only commits.
   
   Related: #9665


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