Skip to content

Conversation

@ViggoC
Copy link
Contributor

@ViggoC ViggoC commented Oct 10, 2025

What's Changed

Implement VectorAppender for RunEndEncodedVector

Closes #762 .

@github-actions

This comment has been minimized.

@lidavidm lidavidm added the enhancement PRs that add or improve features. label Oct 11, 2025
@github-actions github-actions bot added this to the 18.4.0 milestone Oct 11, 2025
public ValueVector visit(RunEndEncodedVector deltaVector, Void value) {
Preconditions.checkArgument(
typeVisitor.equals(deltaVector),
"The vector to append must have the same type as the targetVector being appended");
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"The vector to append must have the same type as the targetVector being appended");
"The vector to append must have the same type as the deltaVector being appended");

Comment on lines +729 to +734
// Shift the delta run-ends vector in-place before appending.
shiftRunEndsVector(
deltaRunEndsVector,
deltaRunEndsVector.getDataBuffer(),
targetLogicalValueCount,
deltaRunEndsVector.getValueCount());
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we ever defined it clearly, but I'm not sure that we want to modify deltaVector. It would be safer IMO to do this to a copy, or even just do the shift+append and never modify the delta run-ends vector.

Comment on lines +744 to +745
private void shiftRunEndsVector(
ValueVector toRunEndVector, ArrowBuf fromRunEndBuffer, int offset, int physicalLength) {
Copy link
Member

Choose a reason for hiding this comment

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

It's also very confusing to frame this as a 'to vector' and 'from buffer' when really it is in an in-place change.

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

Labels

enhancement PRs that add or improve features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement VectorAppender of RunEndEncodedVector

2 participants