Skip to content

[Java] Variable width vectors' get methods should return null when the underlying data is null #22381

@asfimport

Description

@asfimport

For variable-width vectors (VarCharVector and VarBinaryVector), when the validity bit is not set, it means the underlying data is null, so the get method should return null.

However, the current implementation throws an IllegalStateException when NULL_CHECKING_ENABLED is set, or returns an empty array when the flag is clear.

Maybe the purpose of this design is to be consistent with fixed-width vectors. However, the scenario is different: fixed-width vectors (e.g. IntVector) throw an IllegalStateException, simply because the primitive types are non-nullable.

Reporter: Liya Fan / @liyafan82
Assignee: Liya Fan / @liyafan82

PRs and other links:

Note: This issue was originally created as ARROW-5973. Please see the migration documentation for further details.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions