datafusion: no way to set snapshot summary properties on the `insert_into` commit path
I maintainer di solito rispondono entro 3 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 72/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- rust
- Ambito
- backend-api-design, databases
Direzione di ricerca
Inizia da IcebergTableProvider::insert_into in crates/integrations/datafusion/src/table/mod.rs e dal flusso di commit in crates/integrations/datafusion/src/physical_plan/commit.rs, quindi confronta FastAppendAction::set_snapshot_properties in crates/iceberg/src/transaction/append.rs. Segui il valore del provider attraverso IcebergCommitExec e verifica che un commit INSERT INTO accetti le proprietà, preservando il comportamento di validazione esistente per le chiavi riservate.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The transaction API supports user snapshot properties on an append — FastAppendAction::set_snapshot_properties (crates/iceberg/src/transaction/append.rs:70), carried into the snapshot summary and validated against reserved keys (#2744, #2725 show this surface is maintained). The DataFusion integration cannot reach it: IcebergTableProvider::insert_into (crates/integrations/datafusion/src/table/mod.rs:153) builds IcebergWriteExec + IcebergCommitExec (table/mod.rs:221-226), and the commit node creates the transaction internally —
// crates/integrations/datafusion/src/physical_plan/commit.rs:243-252
let tx = Transaction::new(&table);
let action = tx.fast_append().add_data_files(data_files);
let _updated_table = action
.apply(tx)
.map_err(to_datafusion_error)?
.commit(catalog.as_ref())
.await?;
— with no hook between building the action and committing it, so the properties parameter that exists one layer down is unreachable from an INSERT INTO.
(Line references are against main @ a500a2e7; the same shape ships in 0.10.x.)
Why this matters
Facts about a write are naturally snapshot summary properties: source scan counts, rows dropped by an ingest filter, cast-failure tallies, a recipe/job id — anything audit- or lineage-shaped that describes this append rather than the table. An embedder who wants them today has to reimplement the integration's whole write path beside the integration — the same RollingFileWriterBuilder + DataFileWriterBuilder calls as physical_plan/write.rs:239, the same fast_append as commit.rs:244 — solely to pass one HashMap the transaction API already accepts. That is what we ended up doing, and the duplicated path has to track every upstream improvement to the real one by hand.
Proposal
The smallest API that closes the gap: a builder-style setter on the provider, threaded through to the commit node —
let provider = IcebergTableProvider::try_new(...)
.await?
.with_snapshot_properties(props); // HashMap<String, String>
IcebergCommitExec gains the field and applies it:
let action = tx.fast_append()
.add_data_files(data_files)
.set_snapshot_properties(self.snapshot_properties.clone());
Granularity note: properties set this way are per-provider, which is per-statement for embedders that register a provider per statement, and that is the audit use case. A session/statement-option spelling (e.g. iceberg.snapshot-property.*) could layer on later for SQL-level use, but the provider hook alone removes the need to fork the write path.
Reserved-key validation stays where it is — the action already owns it, so an invalid property fails the commit exactly as it does through the transaction API directly.
Happy to send a PR if the shape sounds right.
- Lingua principale
- Rust
- Stelle
- 1.4k
- Fork
- 612
- Merge medio
- 4g 6h
- PR unite (30g)
- 83
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/iceberg-rust
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
apache/iceberg-rust#3551 ·
I maintainer di solito rispondono entro 3 giorni
-
REST create_table omits partition spec-id; Java-based servers (Polaris) reject itForse già presa @ninglinLiu l’ha presa 3 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
apache/iceberg-rust#3469 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
V1 manifest lists written by Java lose added/existing/deleted file countsForse già presa @kacper-li-airspace-intelligence l’ha presa 15 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
apache/iceberg-rust#3445 ·
I maintainer di solito rispondono entro 3 giorni
-
Rename position delete index to clarify referenced data file keyForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
apache/iceberg-rust#3359 ·
I maintainer di solito rispondono entro 3 giorni
-
Row filter keeps every row for `<` and `<=` on a null column that is missing from the data fileForse già presa @mattfaltyn l’ha presa 7 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
apache/iceberg-rust#3355 · 1 reazione ·
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di apache/iceberg-rust
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
swc-project/swc-next#1165 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
Alive24/shea-symphony#574 ·
-
bug tests Windows
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
documentation good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
dev-five-git/devup-ui#879 ·
I maintainer di solito rispondono entro 11 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
farion1231/cc-switch#9038 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno