Support the proposed DictionaryEncoding.custom_metadata (format 1.6) for dictionaries of extension types in IPC
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 42/100
調査の方向性
Start by reading ArrowStreamWriter.GetFieldMetadataOffset and MessageSerializer.FieldFromFlatbuffer, then inspect the generated FlatBuffers types and the existing IPC tests. Implement the format 1.6 dictionary value metadata handling in the writer and reader, preserving field metadata for the whole dictionary type. Add the .NET archery dictionary_extension integration case and verify the new behavior against the proposed semantics; the issue notes this work depends on the format vote passing.
索引モデルが issue の本文から書いたものです。
説明
Describe the enhancement requested
In IPC, a dictionary-encoded field has no separate schema node for its value type, so dictionary<values=extension<X>> and extension<X, storage=dictionary<...>> serialize identically, with ARROW:extension:name in Field.custom_metadata. This is tracked upstream as apache/arrow#49704. A format change proposed in apache/arrow#53994 (format version 1.6) adds an optional DictionaryEncoding.custom_metadata that holds the dictionary value type's metadata. That's the IPC counterpart of ArrowSchema.dictionary->metadata in the C Data Interface. Field.custom_metadata keeps describing the whole dictionary type.
The format change is a draft pending a [VOTE] on dev@. Companion PRs: apache/arrow-go#1381, apache/arrow-rs#11622, apache/arrow-nanoarrow#972. This issue is to implement it in Apache.Arrow once the vote passes.
Current Apache.Arrow behavior
- Writer:
ArrowStreamWriter.GetFieldMetadataOffsetputs a dictionary value type's extension keys inField.custom_metadata, which is the same encoding as an extension over a dictionary. - Reader:
MessageSerializer.FieldFromFlatbufferresolvesField.custom_metadataagainst the value type before wrapping it in aDictionaryType, so it reads field-level keys as describing the values. That's the opposite of Arrow C++ and of the proposed spec. As a result:- an extension over a dictionary written by Arrow C++ doesn't resolve;
- Arrow C++ can't read a
dictionary<int32, arrow.uuid>written by Apache.Arrow (Invalid storage type for UuidType: dictionary<...>); it can't read the one it writes itself today either.
Proposed work (after the vote)
- Regenerate the flatbuffers code for the new
DictionaryEncoding.custom_metadatamember. - Writer: put a value extension type's
ARROW:extension:*keys inDictionaryEncoding.custom_metadatainstead ofField.custom_metadata. An extension over a dictionary keeps its keys on the field. - Reader: apply
DictionaryEncoding.custom_metadatato the value type before wrapping it in the dictionary type, then applyField.custom_metadatato the whole dictionary type. - Add the archery
dictionary_extensionintegration case for .NET.
Decision: field-level keys on a dictionary follow the spec, with no fallback
Field.custom_metadata on a dictionary-encoded field describes only the whole dictionary type, as in Arrow C++ and arrow-go, and the reader won't retry it against the value type. Breaking change: dictionary<extension> files written by earlier Apache.Arrow versions (and by every writer before 1.6) will read as a plain dictionary of the storage type, so this needs a release note. #474 makes the same choice for C Data import.
The C Data side is aligned with these semantics in #474.
Component(s)
C#
- 主要言語
- C#
- スター
- 42
- フォーク
- 32
- 平均マージ
- 1日 3時間
- マージ済み PR(30日)
- 25
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/arrow-dotnet のほかの issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
apache/arrow-dotnet#410 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
apache/arrow-dotnet#409 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
apache/arrow-dotnet#397 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
apache/arrow-dotnet#378 ·
メンテナーはふだん 1 日以内に返信
-
Add compute kernels (Sum/Min/Max/Mean) using System.Numerics.Tensors (TensorPrimitives) and Tensor<T> support対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 32/100
apache/arrow-dotnet#375 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
apache/arrow-dotnet の issue をすべて見る
似ている issue
-
area-multitenancy area-security p1-recommended priority-high technical-debt
難易度 2/5 1時間未満 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
help wanted needs-unity ready for a contributor
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
eyalgolan/statecraft-israel#1542 ·
メンテナーはふだん 1 日以内に返信
-
kind/enhancement Provider Upgrade pulumi/pulumi-azure R1 Task
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
pulumi/pulumi-azure#3669 ·
-
[BUG] FromCString causes 1 byte OOB read in native code対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンtype/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信