[Variant] Support UUID conversion in cast_to_variant
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 52/100
Direzione di ricerca
Read parquet-variant-compute/src/cast_to_variant.rs and src/arrow_to_variant.rs, especially the fixed-size binary conversion path. Trace how the conversion receives arrays and how nested list, struct, and map fields are handled; the issue leaves the API shape open. Done means field metadata can preserve annotated UUID values, unannotated binary remains binary, nulls remain null, and existing array-only callers keep their behavior.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Is your feature request related to a problem or challenge?
This came up while implementing SQL casts to Variant in datafusion-variant.
cast_to_variant and cast_to_variant_with_options cannot distinguish an Arrow UUID column from ordinary FixedSizeBinary(16). The arrow.uuid annotation belongs to the input Field, but these APIs accept only &dyn Array.
The conversion dispatches on the storage data type and converts fixed-size binary values to Variant::Binary. A caller implementing CAST(uuid_column AS VARIANT) therefore cannot preserve UUID semantics through this kernel, even when it has the correctly annotated input field.
This follows from the implementation in Arrow 60.0.0 and remains the case on current main: the fixed-size binary path receives no extension metadata.
Describe the solution you'd like
Allow callers to supply input field information, for example through a conversion entry point accepting &Field and &dyn Array. Use the canonical arrow.uuid annotation to distinguish UUID from ordinary binary:
| Input | Expected Variant value |
|---|---|
FixedSizeBinary(16) annotated with arrow.uuid |
Variant::Uuid |
Unannotated FixedSizeBinary(16) |
Variant::Binary |
| Arrow null | Arrow null |
Honor UUID annotations on nested fields in lists, structs, and maps as well. Existing array-only callers should retain their binary conversion behavior. The exact API shape is open for discussion.
Additional context
Related work addressed UUID metadata in shredded Variant storage:
- #10015: merged UUID metadata preservation for shredded fields and Parquet writing.
In #10015's discussion, the justification was that a shredded FixedSizeBinary(16) field can only represent UUID: Arrow uses dedicated decimal types, and the shredding specification stores binary as BYTE_ARRAY. The merged change therefore attaches UUID metadata when constructing or canonicalizing those shredded fields.
That inference relies on the input already being shredded Variant storage. Ordinary Arrow inputs to cast_to_variant need their field metadata to distinguish UUID from binary.
- Lingua principale
- Rust
- Stelle
- 3.7k
- Fork
- 1.5k
- Merge medio
- 2g 16h
- PR unite (30g)
- 183
Preparare l'ambiente
- 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/arrow-rs
-
parquet: `ArrowWriter::try_new` panics on a schema with a Union field instead of returning an errorAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
`RunArray::try_new` rejects run ends whose null buffer has no nullsForse già presa @Surajsuthar l’ha presa 2 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
apache/arrow-rs#12427 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[Variant] `variant_get` string and binary cast errors show Rust builder type namesForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 61/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di apache/arrow-rs
Issue simili
-
area:ui effort:medium enhancement P7 source:agent
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
marketing
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
machine rename accepts a label already used by another machine, making --machine <label> ambiguousApertamaintainer-needed p2 remote triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
bug help wanted ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
userFRM/egui-charts#4605 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno