apache / apache/parquet-java

Thrift binary fields are not serialized correctly

オープン
#1,416 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
Component: Parquet Priority: Major Type: bug
主要言語
Java
スター
3.1k
フォーク
1.6k
平均マージ
3日 12時間
マージ済み PR(30日)
33

説明

Thrift binary fields are not serialized correctly - I believe UTF-8 encoding is applied.

A demonstration of this bug is shown in https://github.com/laurencer/parquet-mr-bug

This appears to be an issue in Parquet-MR where Thrift TType is used determine the type of fields. TType actually represents the on-disk/encoded field type tag - that does not distinguish between binary and string fields.

String data is not actually represented on-disk as being different - instead it is up to the program to interpret the binary data as a UTF-8 encoded string. Parquet-MR instead assumes that every binary field is a UTF-8 encoded string.

This may have arisen because the binary field tag is actually TType.String (where it actually just represents a raw binary field).

**Reporter**: [Laurence Rouesnel](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=laurencer)

**Note**: *This issue was originally created as [PARQUET-158](https://issues.apache.org/jira/browse/PARQUET-158). Please see the [migration documentation](https://issues.apache.org/jira/browse/PARQUET-2502) for further details.*

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

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

調査の方向性

リンクされている parquet-mr-bug のデモンストレーションから始め、Parquet-MR がバイナリフィールドに対して Thrift TType.String をどのように処理しているかを追跡します。バイナリデータが UTF-8 として解釈される箇所を確認し、その経路を文字列フィールドの場合と比較します。生のバイナリフィールドが UTF-8 として解釈されずにシリアライズおよびデシリアライズされ、文字列フィールドが期待される動作を維持すれば完了です。

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

評価

技術スタック
java
領域
data-engineering
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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