Reranko05 commented on code in PR #50226:
URL: https://github.com/apache/arrow/pull/50226#discussion_r3441830390
##########
ruby/red-arrow/lib/arrow/column-containable.rb:
##########
@@ -152,5 +152,68 @@ def [](selector)
def column_names
@column_names ||= columns.collect(&:name)
end
+
+ # Merges columns from the given container or Hash and creates
+ # a new container.
+ #
+ # @param other [Hash, self]
+ # The columns to be merged.
+ #
+ # @return [self]
+ def merge(other)
+ added_columns = {}
+ removed_columns = {}
+
+ case other
+ when Hash
+ other.each do |name, value|
+ name = name.to_s
+ if value
+ added_columns[name] = ensure_raw_column(name, value)
+ else
+ removed_columns[name] = true
+ end
+ end
+ when merge_target_class
Review Comment:
Updated
--
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]