[Variant] Configure explicit shredding when writing Parquet

Aperta
#11,950 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
data

Direzione di ricerca

Read parquet-variant-compute/src/shred_variant.rs for the existing kernels and schema builder, then inspect parquet/src/arrow/arrow_writer/mod.rs around schema initialization. Define how writer configuration applies one layout across batches, derives schema and metadata, and handles already-shredded input; done means preserving logical values and null semantics while keeping current behavior without configuration.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement
Is your feature request related to a problem or challenge?

Applications such as datafusion-variant want to select a physical layout for Variant columns when writing Parquet—for example, shredding event.service as Utf8 and event.status as Int64.

This is already possible by calling shred_variant, constructing a RecordBatch with the resulting storage arrays and Variant fields, and passing it to ArrowWriter. Each application must coordinate the transformation, output schema, and metadata itself. Writer-level configuration or a reusable writer adapter would make this easier.

Describe the solution you'd like

Provide a way to associate an explicit shredding schema with a Variant column and write batches containing the original Variant arrays. For example, the caller could supply a logical target DataType built with ShreddedSchemaBuilder; the exact API is open for discussion.

The integration should reuse the existing shredding kernels, derive the corresponding output schema and Variant metadata, and use the selected layout consistently across batches in a file. Unselected fields and incompatible values should remain in the residual Variant data, preserving logical values and null semantics.

Keep the current behavior when no configuration is supplied. Define the policy for already-shredded input, since shred_variant currently rejects it; changing layouts may require unshred_variant first.

Automatic schema selection from sampled data is separate work.

Describe alternatives you've considered
Additional context
Lingua principale
Rust
Stelle
3.7k
Fork
1.5k
Merge medio
2g 16h
PR unite (30g)
183

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/arrow-rs

Tutte le issue di apache/arrow-rs

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.