Copilot commented on code in PR #50854:
URL: https://github.com/apache/arrow/pull/50854#discussion_r3766065430
##########
ruby/red-arrow-format/lib/arrow-format/array.rb:
##########
@@ -875,6 +889,44 @@ def to_a
end
Review Comment:
`FixedSizeBinaryArray#to_a` ignores `@offset`, so `slice(...)` will return
incorrect values when converted to Ruby objects. Other array implementations
apply `@offset` when reading from buffers.
##########
ruby/red-arrow-format/lib/arrow-format/array.rb:
##########
@@ -852,7 +852,21 @@ def type
end
class FixedSizeBinaryArray < Array
- def initialize(type, size, validity_buffer, values_buffer)
+ include BufferAlignable
+
+ def initialize(type, *args)
+ unless type.is_a?(Type)
Review Comment:
`FixedSizeBinaryArray` inherits `ArrowFormat::Array#==`, which only compares
size/validity and can report two arrays as equal even when their values differ
(especially when there are no nulls). This can produce incorrect equality
results and the current tests don’t cover the “different values, same null
pattern” case.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]