[Variant] Support UUID conversion in cast_to_variant
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Rust
- スター
- 3.7k
- フォーク
- 1.5k
- 平均マージ
- 2日 16時間
- マージ済み PR(30日)
- 183
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/arrow-rs のほかの issue
-
parquet: `ArrowWriter::try_new` panics on a schema with a Union field instead of returning an errorオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
`RunArray::try_new` rejects run ends whose null buffer has no nulls対応中かも @Surajsuthar が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
apache/arrow-rs#12427 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
[Variant] `variant_get` string and binary cast errors show Rust builder type names再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 61/100
メンテナーはふだん 1 日以内に返信
apache/arrow-rs の issue をすべて見る
似ている issue
-
area:ui effort:medium enhancement P7 source:agent
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
marketing
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
machine rename accepts a label already used by another machine, making --machine <label> ambiguousオープンmaintainer-needed p2 remote triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
bug help wanted ui
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
userFRM/egui-charts#4605 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信