Skip to content

[SPARK-57929][CORE][SQL] Support Binary/List view types in ArrowColumnVector#57210

Open
robert3005 wants to merge 1 commit into
apache:masterfrom
robert3005:arrow-view-column-vectors
Open

[SPARK-57929][CORE][SQL] Support Binary/List view types in ArrowColumnVector#57210
robert3005 wants to merge 1 commit into
apache:masterfrom
robert3005:arrow-view-column-vectors

Conversation

@robert3005

@robert3005 robert3005 commented Jul 13, 2026

Copy link
Copy Markdown

What changes were proposed in this pull request?

Add support for constructing ArrowColumnVector from String/BinaryView and ListView

Why are the changes needed?

Arrow in spec 1.4 has added these as more efficient way to represent list and string types in memory

Does this PR introduce any user-facing change?

No, this is internal developer api

How was this patch tested?

Added Tests

Was this patch authored or co-authored using generative AI tooling?

Yes, this pr was authored with use of Fable 5

@robert3005

Copy link
Copy Markdown
Author

Can't find anything in the logs about the failure, looks like github flake

@uros-b uros-b left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @robert3005, cc @cloud-fan PTAL

@cloud-fan cloud-fan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: 0 blocking, 1 non-blocking, 0 nits. Clean, well-scoped extension. I verified the manual view-buffer decode in StringViewAccessor byte-for-byte against Arrow's own BaseVariableWidthViewVector.getData (arrow-vector 19.0.0) — the length/bufferIndex/offset positions and the inline vs long branches all match; it's correct.

Suggestions (non-blocking)

  • ArrowColumnVector.java:560 — see inline comment on the untested multi-buffer path.

+ BaseVariableWidthViewVector.PREFIX_WIDTH;
int bufferIndex = views.getInt(bufferIndexOffset);
int start = views.getInt(bufferIndexOffset + BaseVariableWidthViewVector.BUF_INDEX_WIDTH);
ArrowBuf dataBuffer = accessor.getDataBuffers().get(bufferIndex);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking (test coverage): the long-value branch here indexes getDataBuffers().get(bufferIndex), but every long value in the string_view/binary_view/deserialization tests is small enough to land in a single variadic data buffer, so bufferIndex is always 0 — the multi-buffer path is never exercised. Risk is low since the decode matches Arrow's own getData, but a test with enough long values to spill into a second data buffer would close the gap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants