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

Open
#1,109 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
java
Domain
data

Research direction

Start by reading ComplexCopier.copy and compare the getField implementations in UuidReaderImpl and VariantReaderImpl with NullableUuidHolderReaderImpl and NullableVariantHolderReaderImpl. Reproduce the NPE with a holder-backed extension reader, then verify that copying no longer requires an inappropriate getField implementation for holders.

Written by the indexing model from the issue text.

Description

Type: bug
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.

Dominant language
Java
Stars
95
Forks
154
Avg merge
2d 16h
Merged PRs (30d)
9

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/arrow-java

All issues in apache/arrow-java

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.