otegami commented on code in PR #50854:
URL: https://github.com/apache/arrow/pull/50854#discussion_r3838001250


##########
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)
+        type = FixedSizeBinaryType.try_convert(type) || type
+      end
+      if args.size == 1
+        args = build_data(args.first, type)
+      elsif args.size != 3

Review Comment:
   This matches the existing convention `PrimitiveArray#initialize`, so 
`Time32Array.new("foo", [1])` fails the same way today. Validating only here 
would be inconsistent.



-- 
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]

Reply via email to