Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Variant field names not being ordered correctly via UTF-8 byte order

クローズ
#3,735 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
java

調査の方向性

VariantBuilder と Variant.getFieldByKey から始め、補助平面のフィールド名を持ち、二分探索を発生させるのに十分な数のフィールドを持つオブジェクトを使って問題を再現します。フィールド ID が UTF-8 のバイト順に従っていること、および parquet-java と仕様準拠の writers の両方で生成されたオブジェクトで検索が成功することを確認します。

索引モデルが issue の本文から書いたものです。

説明

Type: bug
Describe the bug, including details regarding any error messages, version, and platform.

The Variant spec requires the field ids in an object's header to be sorted by the
UTF-8 byte order of the field names, so a reader can binary-search them.
VariantBuilder sorted the fields — and Variant.getFieldByKey binary-searched them —
using String.compareTo, which orders by UTF-16 code units, not UTF-8 bytes.

The two orderings are identical for all field names in the Basic Multilingual Plane, but
they diverge for names containing supplementary-plane characters (U+10000 and above):
String.compareTo orders a leading high surrogate (0xD800–0xDBFF) before code points in
U+E000..U+FFFF, whereas UTF-8 byte order (and the spec) orders them after. Consequences:

  • An object parquet-java builds with such keys has field ids sorted in an order that
    violates the spec.
  • A spec-compliant reader (e.g. the Apache Arrow C++/Rust/Go Variant readers) binary-searching
    that object can fail to find fields.
  • Conversely, parquet-java's own binary search fails to find a supplementary-plane key in an
    object produced by a spec-compliant writer.

The bug only surfaces when an object both contains a supplementary-plane key and is large
enough to take the binary-search path, so it has gone unnoticed.

Component(s)

Core

主要言語
Java
スター
3.1k
フォーク
1.6k
平均マージ
6日 16時間
マージ済み PR(30日)
36

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/parquet-java のほかの issue

apache/parquet-java の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。