apache / apache/parquet-java

Parquet proto writer de-nest Protobuf wrapper classes

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

説明

Existing Parquet protobuf writer support preserves the structure of any Protobuf Message objects.  This works well in most cases. However, when dealing with [Protobuf wrapper messages](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/wrappers.proto), users may prefer directly writing the de-nested value into the Parquet files, for ease of querying them directly (in query engine such as Hive/Presto). 

Proposal: 
- Implement a control flag, e.g., enableDenestingWrappers, to control whether or not to denest Protobuf wrapper classes. 
- When this flag is set to true, write the Protobuf wrapper classes as single primitive fields, based on the type of the wrapped **value** field.
 

|Protobuf Type|Parquet Type|
|
|-|-|-|
|BoolValue|boolean|
|
|BytesValue|binary|
|
|DoubleValue|double|
|
|FloatValue|float|
|
|Int32Value|int64 (32-bit, signed)|
|
|Int64Value|int64 (64-bit, signed)|
|
|StringValue|binary (string)|
|
|UInt32Value|int64 (32-bit, unsigned)|
|
|UInt64Value|int64 (64-bit, unsigned)|



 |

**Reporter**: [Ying Xu](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=yxu-apache)

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

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

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

調査の方向性

まず、既存の Parquet protobuf writer サポートの場所と、Protobuf Message オブジェクトを Parquet フィールドにマッピングする方法を確認します。wrapper denesting の制御フラグを定義し、その出力を一覧にある wrapper-to-primitive mappings と比較します。フラグによって、wrapper をネストされたままにするか、単一の primitive フィールドとして書き込むかを制御できれば完了です。

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

評価

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

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

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