kou commented on code in PR #50854:
URL: https://github.com/apache/arrow/pull/50854#discussion_r3841878076
##########
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)
Review Comment:
Could you use existing style?
```suggestion
args = build_data(args[0], type)
```
##########
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:
Could you use existing style?
```suggestion
args = build_data(args.first, type) if args.size == 1
if args.size != 3
```
--
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]