jatorre opened a new issue, #3639:
URL: https://github.com/apache/iceberg-rust/issues/3639

   ### Is your feature request related to a problem or challenge?
   
   PyIceberg's `add_files` registers existing Parquet files without rewriting 
them, but PyIceberg cannot write format-version 3 snapshots yet 
(apache/iceberg-python#3620–#3622), so there is no way from Python to add files 
to a v3 table, for example one with a `geometry` column. iceberg-rust already 
does the hard part: its fast append writes v3 manifest lists with 
`first-row-id` and the snapshot's row range.
   
   Two pieces are missing to use it from Python:
   
   1. `ParquetWriter::parquet_files_to_data_files` (data files from existing 
Parquet footers) is `pub(crate)` and `#[allow(dead_code)]`.
   2. `Transaction::commit` needs a Rust `Catalog`. A Python caller already has 
a catalog client (PyIceberg's), so it only needs the commit itself: the 
requirements and updates of a `CommitTableRequest`.
   
   ### Describe the solution you'd like
   
   - Make `parquet_files_to_data_files` public.
   - Add `Transaction::build_commit(self) -> Result<TableCommit>`: apply the 
actions (writing the manifests) and return the commit without sending it. No 
refresh and no retry: the caller rebuilds on a conflict.
   - In `pyiceberg-core`, add `pyiceberg_core.transaction.add_files(identifier, 
metadata_location, table_metadata_json, file_paths, io_properties, 
snapshot_properties=None) -> str`, returning the commit as JSON for PyIceberg 
to send with `catalog.commit_table`.
   
   We tried this against a REST catalog (our own, SeaweedFS-based): v3 table 
with a geometry column created by DuckDB 2.0, two Parquet files added through 
the binding, commit sent by PyIceberg 0.12. DuckDB and PyIceberg then read 
3,000 rows with consistent row ids, and a later DuckDB insert continued them 
(`next-row-id` 3000 → 3010).
   
   ### Willingness to contribute
   
   I can contribute this feature independently (PR to follow).
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to