mrkn commented on code in PR #14417:
URL: https://github.com/apache/arrow/pull/14417#discussion_r995818525
##########
ruby/red-arrow/lib/arrow/raw-table-converter.rb:
##########
@@ -35,7 +35,11 @@ def convert
fields = []
@values = []
@raw_table.each do |name, array|
- array = ArrayBuilder.build(array) if array.is_a?(::Array)
+ if array.respond_to?(:to_arrow_array)
+ array = array.to_arrow_array
+ elsif array.is_a?(::Array)
Review Comment:
Do you think how to handle objects that respond to `to_ary` in addition to
normal arrays?
--
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]