This is an automated email from the ASF dual-hosted git repository. github-merge-queue[bot] pushed a commit to branch gh-readonly-queue/main/pr-12431-a5c9ea96a564d52471098db187720841105d6ab1 in repository https://gitbox.apache.org/repos/asf/arrow-rs.git
commit 5c260682dc26ee97dc526feaf706ebd96e10d5a6 Author: Matt Butrovich <[email protected]> AuthorDate: Tue Nov 24 02:22:55 2026 +0000 docs(arrow-row): fix the padding of the final block in the variable-length encoding docs (#12431) # Which issue does this PR close? None. This is a one-sentence doc fix. # Rationale for this change The `RowConverter` docs say the final block of a variable-length value "is padded to 32-bytes". Since #4818 split the first 32 bytes into four 8-byte blocks, a value of up to 32 bytes ends in an 8-byte block, as [`non_null_padded_length`](https://github.com/apache/arrow-rs/blob/a5c9ea96a564d52471098db187720841105d6ab1/arrow-row/src/variable.rs#L50-L58) computes. For example, `"abc"` encodes as `[2, 97, 98, 99, 0, 0, 0, 0, 0, 3]`. #4812 made this change to stop padding small strings to 32 bytes. # What changes are included in this PR? The sentence now says the final block is padded to the length of its block. # Are these changes tested? The PR changes only documentation. # Are there any significant user-facing changes? No. # AI usage disclosure Claude helped me draft the PR description. --- arrow-row/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arrow-row/src/lib.rs b/arrow-row/src/lib.rs index fcce0ecbba..dc9ed15650 100644 --- a/arrow-row/src/lib.rs +++ b/arrow-row/src/lib.rs @@ -269,8 +269,8 @@ const DICTIONARY_GATHER_RATIO: usize = 4; /// encoded using a block based scheme described below. /// /// The byte array is broken up into fixed-width blocks, each block is written in turn -/// to the output, followed by `0xFF_u8`. The final block is padded to 32-bytes -/// with `0_u8` and written to the output, followed by the un-padded length in bytes +/// to the output, followed by `0xFF_u8`. The final block is padded with `0_u8` to the +/// length of its block and written to the output, followed by the un-padded length in bytes /// of this final block as a `u8`. The first 4 blocks have a length of 8, with subsequent /// blocks using a length of 32, this is to reduce space amplification for small strings. ///
