FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

GH-109: Implement Vector Validators for StringView by ViggoC · Pull Request #886 · apache/arrow-java · GitHub

GH-109: Implement Vector Validators for StringView - #886

Merged
lidavidm merged 3 commits into
apache:mainfrom
ViggoC:gh-109
Oct 29, 2025
Merged

GH-109: Implement Vector Validators for StringView#886
lidavidm merged 3 commits into
apache:mainfrom
ViggoC:gh-109

Conversation

ViggoC commented Oct 15, 2025

Copy link
Copy Markdown
Contributor

What's Changed

Implement Vector Validators for StringView.

Closes #109.

This comment has been minimized.

lidavidm added the enhancement PRs that add or improve features. label Oct 15, 2025
github-actions Bot added this to the 18.4.0 milestone Oct 15, 2025
Comment on lines +162 to +165
validateOrThrow(
vector.getValueCount() >= 0,
"Vector valueCount %s is negative.",
vector.getValueCapacity());

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Can we use validateVectorCommon?

The comment in validateVectorCommon points back to #109. So I feel like figuring that out should be part of resolving the issue.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

How do you think validateVectorCommon should be modified to support StringView? My idea is

if (vector instanceof BaseVariableWidthViewVector) {
      int typeBufferCount = TypeLayout.getTypeBufferCount(arrowType);
      validateOrThrow(
          fieldVector.getFieldBuffers().size() >= typeBufferCount,
          "Expected at least %s buffers in vector of type %s, got %s.",
          typeBufferCount,
          vector.getField().getType().toString(),
          fieldVector.getFieldBuffers().size());
} 

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Roughly yes but I would prefer adding a TypeLayout.isVariableBuffer instead of hardcoding a type check

lidavidm merged commit c4d3c9e into apache:main Oct 29, 2025
25 of 26 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

[Java] Implement Vector Validators for StringView

2 participants


Back | FazBrowse Home | New Git URL