Reranko05 commented on code in PR #50452:
URL: https://github.com/apache/arrow/pull/50452#discussion_r3553281616
##########
ruby/red-arrow-format/lib/arrow-format/array.rb:
##########
@@ -537,7 +537,17 @@ class DurationArray < TemporalArray
end
class VariableSizeBinaryArray < Array
- def initialize(size, validity_buffer, offsets_buffer, values_buffer)
+ include BufferAlignable
+ def initialize(*args)
+ if args.size == 1
+ args = build_data(args.first)
+ elsif args.size != 4
+ raise ArgumentError,
+ "wrong number of arguments (given #{args.size}, expected 1 or 4)"
+ end
Review Comment:
I kept the tests focused on the new constructor behavior, but I can add a
roundtrip test if you think it's needed.
--
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]