fix(format): pass row body size, not full payload size, to BinaryRow.pointTo#3715
Open
stevenschlansker wants to merge 3 commits into
Open
fix(format): pass row body size, not full payload size, to BinaryRow.pointTo#3715stevenschlansker wants to merge 3 commits into
stevenschlansker wants to merge 3 commits into
Conversation
added 2 commits
May 29, 2026 16:03
…pointTo BinaryRowEncoder.decode consumes an 8-byte schema hash, then pointed the row at the rest of the buffer with the full payload size. The row's sizeInBytes was therefore 8 too large, so copy(), toBytes(), and getSizeInBytes() on that row would include 8 trailing bytes of unrelated buffer content. The bug is latent: decode does not expose the row to callers, and the reader index was already advanced correctly by size - 8. The regression test substitutes a capturing GeneratedRowEncoder and asserts BinaryRow.getSizeInBytes() equals the payload minus the schema hash.
The class javadoc carried a trailing "<p>, ganrunsheng" line — a truncated attribution. Keep only the one-sentence description.
The MemoryBuffer overloads respect sizeEmbedded for stream framing; the byte[] overloads do not, because encode(T) writes no size prefix and decode(byte[]) uses bytes.length. Comment the three byte[] decode methods so the asymmetry isn't mistaken for a bug.
370d762 to
f4facff
Compare
Contributor
Author
|
I'm not understanding the CI failure. The license header check fails with no output. |
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why?
Minor fixes
AI Contribution Checklist
yes/noAI Usage Disclosure
Does this PR introduce any user-facing change?
No