This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git
The following commit(s) were added to refs/heads/main by this push:
new 7ad2299e8c Minor: document why FixedSizeBinary offset is always 0
(#9861)
7ad2299e8c is described below
commit 7ad2299e8cc1be2af4648fa7df412c3338fa3b3c
Author: Andrew Lamb <[email protected]>
AuthorDate: Fri May 1 08:18:19 2026 -0400
Minor: document why FixedSizeBinary offset is always 0 (#9861)
# Which issue does this PR close?
- related to https://github.com/apache/arrow-rs/pull/9850
# Rationale for this change
While working on https://github.com/apache/arrow-rs/pull/9850 I noticed
that FixedSizeBinaryArray::offset always returns zero.
This was confusing to me and so I wanted to document it for future
readrs
# What changes are included in this PR?
Add some comments
# Are these changes tested?
By CI
# Are there any user-facing changes?
No, this is internal comments
---
arrow-array/src/array/fixed_size_binary_array.rs | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arrow-array/src/array/fixed_size_binary_array.rs
b/arrow-array/src/array/fixed_size_binary_array.rs
index e8272be5d6..39bfc1db4a 100644
--- a/arrow-array/src/array/fixed_size_binary_array.rs
+++ b/arrow-array/src/array/fixed_size_binary_array.rs
@@ -643,6 +643,8 @@ unsafe impl Array for FixedSizeBinaryArray {
}
fn offset(&self) -> usize {
+ // Slices are normalized by slicing `value_data`/`nulls` directly;
+ // FSB does not retain a separate logical element offset.
0
}