Reranko05 commented on code in PR #50226:
URL: https://github.com/apache/arrow/pull/50226#discussion_r3441837409
##########
ruby/red-arrow/lib/arrow/record-batch.rb:
##########
@@ -135,6 +78,20 @@ def method_missing(name, *args, &block)
private
+ def merge_target_class
+ RecordBatch
+ end
+
+ def create_merged_container(fields, arrays)
+ record_batch = self.class.new(
+ Schema.new(fields),
+ n_rows,
+ arrays,
+ )
Review Comment:
I investigated using `RecordBatch.new(Schema.new(fields), arrays)` to unify
this code, but it uses the `RecordBatchBuilder` path and fails for the merged
arrays. It looks like `RecordBatch.new(schema, n_rows, arrays)` is required
here, so I kept the current implementation.
If you have any other way in mind to unify this code, let me know.
--
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]