alexanderbianchi opened a new pull request, #152:
URL: https://github.com/apache/datafusion-iceberg/pull/152

   Stacked on #116 at `c21f917`, with current upstream `main` merged into the 
branch. Part of #24. [Review the builder changes on top of 
#116](https://github.com/alexanderbianchi/datafusion-iceberg-upstream/compare/090ff3489ae8357fcfd0696ba4234294862c85d1...2ecc57212746082304e97ace7474ef2c166713c2).
   
   ## Catalog configuration
   
   A single builder registers live Iceberg tables, a fixed set of writable 
table identifiers, or read-only tables and snapshots. Existing callers can keep 
using `IcebergCatalogProvider::try_new` and the existing table-provider 
constructors.
   
   ```rust
   let reporting = IcebergCatalogProvider::builder()
       .with_iceberg_catalog(client)
       .with_fixed_tables([TableIdent::from_strs(["sales", "orders"])?])
       .build()
       .await?;
   ctx.register_catalog("reporting", Arc::new(reporting));
   ```
   
   - **Live catalog.** Supply any Iceberg catalog, including REST, memory, or a 
cache wrapper. The default discovers namespaces and table names at 
registration. Explicit namespaces skip startup listing and resolve tables on 
demand, including tables created by another client.
   - **Fixed identifiers.** The builder derives namespaces from the 
identifiers. Unlisted lookups return locally, listed tables can receive 
appends, and membership-changing DDL is rejected.
   - **Detached tables and snapshots.** Register a loaded table with 
`with_static_table`, or select a historical snapshot with `with_snapshot`. Both 
also expose Iceberg metadata tables.
   - **Request context.** `with_session_catalog` binds a shared Iceberg session 
catalog and a trusted context before discovery. Reads, writes, and transaction 
refreshes reuse that binding.
   
   The catalog-backed and static providers share one scan implementation. Live 
scans still refresh through the supplied Iceberg catalog. Detached scans use 
the supplied table metadata. The Iceberg client owns cross-query caching. 
Query-wide snapshot selection for live tables remains a follow-up under #24.
   
   ## Validation
   
   A retained DataFrame and a saved SQL view both see a third append. A 
detached table still sees the first two rows and a historical snapshot sees 
only the first. A recording in-memory catalog verifies that a lookup outside 
the fixed set makes zero backend calls and that the writer and reader each use 
their own session context.
   
   Passed locally with the pinned toolchain:
   
   ```sh
   cargo fmt --all -- --check
   cargo clippy --workspace --locked --all-targets -- -D warnings
   cargo test --workspace --locked
   ```
   
   AI assistance was used to implement and test this draft.
   


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