This is an automated email from the ASF dual-hosted git repository.

jeffreyvo 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 8ff719044e Implement `BinaryArrayType` for `&FixedSizeBinaryArray`s 
(#8993)
8ff719044e is described below

commit 8ff719044e5ec00b6fd547360d3924475d3649d6
Author: Jeffrey Vo <[email protected]>
AuthorDate: Mon Dec 15 13:07:36 2025 +0900

    Implement `BinaryArrayType` for `&FixedSizeBinaryArray`s (#8993)
    
    # Which issue does this PR close?
    
    We generally require a GitHub issue to be filed for all bug fixes and
    enhancements and this helps us generate change logs for our releases.
    You can link an issue to this PR using the GitHub syntax.
    
    - Closes #8992
    
    # Rationale for this change
    
    Makes `FixedSizeBinaryArray` in-line with other binary array types, and
    easier for downstream users to treat them the same way.
    
    # What changes are included in this PR?
    
    Implement `BinaryArrayType` trait for `&FixedSizeBinaryArray`s.
    
    # Are these changes tested?
    
    Trait implementation only.
    
    # Are there any user-facing changes?
    
    New trait implementation for `&FixedSizeBinaryArray`.
---
 arrow-array/src/array/mod.rs | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/arrow-array/src/array/mod.rs b/arrow-array/src/array/mod.rs
index 2581e5ce4d..f05916fd24 100644
--- a/arrow-array/src/array/mod.rs
+++ b/arrow-array/src/array/mod.rs
@@ -620,10 +620,11 @@ impl<'a> StringArrayType<'a> for &'a StringViewArray {
     }
 }
 
-/// A trait for Arrow String Arrays, currently three types are supported:
+/// A trait for Arrow Binary Arrays, currently four types are supported:
 /// - `BinaryArray`
 /// - `LargeBinaryArray`
 /// - `BinaryViewArray`
+/// - `FixedSizeBinaryArray`
 ///
 /// This trait helps to abstract over the different types of binary arrays
 /// so that we don't need to duplicate the implementation for each type.
@@ -642,6 +643,11 @@ impl<'a> BinaryArrayType<'a> for &'a BinaryViewArray {
         BinaryViewArray::iter(self)
     }
 }
+impl<'a> BinaryArrayType<'a> for &'a FixedSizeBinaryArray {
+    fn iter(&self) -> ArrayIter<Self> {
+        FixedSizeBinaryArray::iter(self)
+    }
+}
 
 impl PartialEq for dyn Array + '_ {
     fn eq(&self, other: &Self) -> bool {

Reply via email to