datafusion: no way to set snapshot summary properties on the `insert_into` commit path
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- rust
- Área
- backend-api-design, databases
Línea de trabajo
Comienza con IcebergTableProvider::insert_into en crates/integrations/datafusion/src/table/mod.rs y el flujo de commit en crates/integrations/datafusion/src/physical_plan/commit.rs; después, compara FastAppendAction::set_snapshot_properties en crates/iceberg/src/transaction/append.rs. Sigue el valor del provider a través de IcebergCommitExec y verifica que un commit de INSERT INTO acepte las propiedades, conservando el comportamiento de validación existente para las claves reservadas.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Rust
- Estrellas
- 1.4k
- Forks
- 574
- Merge medio
- 1 d 20 h
- PR fusionados (30 d)
- 65
Preparar el entorno
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/iceberg-rust
-
Remove license clarification for zstd-sys once workspace upgrades zstd (zstd 0.14, zstd-sys 2.1)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
apache/iceberg-rust#3307 ·
Los mantenedores suelen responder en 1 día
-
datafusion
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
apache/iceberg-rust#3297 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
apache/iceberg-rust#3285 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
apache/iceberg-rust#3280 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
apache/iceberg-rust#3234 · 2 reacciones ·
Los mantenedores suelen responder en 1 día
Todos los issues de apache/iceberg-rust
Issues similares
-
agent:triaged bug bughunt pm:npm priority:p1
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
SocketDev/socket-patch#464 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
Los mantenedores suelen responder en 3 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
stellar/stellar-cli#2773 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día