apache / apache/arrow-java

[Vector][ExtensionType] ComplexCopier requires that extension types' holder readers implement getField

オープン
#1,109 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
Type: bug
主要言語
Java
スター
94
フォーク
152
平均マージ
3日 16時間
マージ済み PR(30日)
11

説明

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

https://github.com/apache/arrow-java/pull/892 made efforts to streamline and simplify extension readers and writers. In this, `ComplexCopier.copy` relies on `FieldReader.getField` being defined for extension types.

Usages of `ComplexCopier.copy` with readers backed by vector, e.g., `UuidReaderImpl` and `VariantReaderImpl` that do have `getField` implementation, should be OK (as there is concrete notion of Field). However, if holder readers, namely, `NullableUuidHolderReaderImpl` or `NullableVariantHolderReaderImpl` are used this results in an NPE.

Having said that `getField` method for holder readers appears to be a misnomer as we do not have a notion of a field for the holders. This can be seen from the absence of `getField` overrides for primitive types.

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

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

調査の方向性

まず ComplexCopier.copy を読み、UuidReaderImpl と VariantReaderImpl の getField 実装を NullableUuidHolderReaderImpl および NullableVariantHolderReaderImpl と比較します。holder ベースの extension reader で NPE を再現し、その後、コピー時に holders に対する不適切な getField 実装が不要になっていることを確認します。

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

評価

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

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

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