Add an option to allow auto conversion from empty fields to NULL
- 主要言語
- Java
- スター
- 3.1k
- フォーク
- 1.6k
- 平均マージ
- 3日 12時間
- マージ済み PR(30日)
- 33
説明
Right now, Parquet Writer throws out an exception:
`Parquet record is malformed: empty fields are illegal, the field should be ommited completely instead`
when an empty field (array or struct or map I guess?) is written.
The suggestion here is to add an option "auto_convert_empty_fields_to_null" that convert empty fields to null automatically on write.
The LOC to change is [here:](https://sourcegraph.com/github.com/apache/parquet-mr/-/blob/parquet-column/src/main/java/org/apache/parquet/io/MessageColumnIO.java#L328)
> `if (emptyField) {`
> ` {{ throw new ParquetEncodingException("empty fields are illegal, the field should be ommited completely instead");`}}
> ``}
**Reporter**: [Zheng Shao](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=zshao)
**Note**: *This issue was originally created as [PARQUET-1945](https://issues.apache.org/jira/browse/PARQUET-1945). Please see the [migration documentation](https://issues.apache.org/jira/browse/PARQUET-2502) for further details.*
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
parquet-column/src/main/java/org/apache/parquet/io/MessageColumnIO.java の 328 行目付近にある `if (emptyField)` ブロックから開始し、Parquet Writer のオプションがどのようにこのコードへ到達するかを追跡してください。`auto_convert_empty_fields_to_null` オプションをどこに配置すべきかを定義し、空の配列、struct、または map が malformed-record exception を発生させるのではなく null として書き込まれることを確認してください。issue ではテストファイルは指定されていません。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- data
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100