Skip to content

[Java] VectorSchemaRoot.slice() throws for NullVector #44344

@maksimyego-db

Description

@maksimyego-db

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

When slicing a VectorSchemaRoot wrapping a NullVector, NullVector.getAllocator() will throw UnsupportedOperationException("Tried to get allocator from NullVector")

It appears that the call could pass in a null for allocator in https://github.com/apache/arrow/blob/release-17.0.0-rc2/java/vector/src/main/java/org/apache/arrow/vector/NullVector.java#L172-L174. Would it make sense to return null instead of throw from NullVector.getAllocator()?

Tangentially related to #30866 that was fixed in #41066 for some vector types.

Component(s)

Java

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions