Make the order of encodings in column metadata deterministic
まだ誰も着手していません。
評価
調査の方向性
org.apache.parquet.format.converter.ParquetMetadataConverter::toFormatEncodings から開始し、Encoding 値の HashSet が返されるリストになるまでの処理を確認してください。等価な書き込みデータが、決定論的な昇順の ordinal 順序で Encoding メタデータを生成し、プロセス依存の順序を排除できれば、作業は完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the enhancement requested
Background
The list of encodings used for a column is stored in the column metadata in the Parquet file footer.
The elements in this list are enumeration constants (org.apache.parquet.format.Encoding), which are collected in a HashSet when the records and fields are written. Later, when the footer is written, the set of enum constants are converted to a temporary list using the HashSet’s iteration order.
Since Enum::hashCode delegates to Object::hashCode (or, in later JDK versions, to System::identityHashCode), the order of the enum constants in this list can vary between runs in different processes, and thus files with identical encodings can represent this list differently (the elements may appear in different order).
Rationale for changing this behaviour
Two processes running the same version of parquet-java and having identical writer configurations can still produce files that are different at the binary level for the exact same written data.
For redundancy reasons, it is not uncommon to write data to Parquet files on two different machines. To verify that the same data has been written on both machines, it is currently not sufficient to compare the files ate the binary level. Instead, the files must be decoded and their actual data must be compared to ensure they are equal.
If the files can be made identical at the binary level, this verification process would be simplified.
Suggested change
The list of encodings is created in org.apache.parquet.format.converter.ParquetMetadataConverter::toFormatEncodings. A simple solution is to sort this list before it is returned, i.e. always return the Encoding enum constants in ascending ordinal order.
Component(s)
Core
- 主要言語
- Java
- スター
- 3.1k
- フォーク
- 1.6k
- 平均マージ
- 6日 16時間
- マージ済み PR(30日)
- 36
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/parquet-java のほかの issue
-
Type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
apache/parquet-java#3792 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
apache/parquet-java#3767 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
apache/parquet-java#3695 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/parquet-java#3667 ·
-
Type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/parquet-java#3574 · コメント 1 件 ·
apache/parquet-java の issue をすべて見る
似ている issue
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
inu-appcenter/memorIN-backend#288 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
frontend maui-pilot pilot-ask question
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
area/plugin
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
kestra-io/plugin-kestra#190 ·