stenlarsson commented on issue #35819:
URL: https://github.com/apache/arrow/issues/35819#issuecomment-1579122051
Here is an example
```ruby
require 'arrow'
def build_join(plan)
left_array = Arrow::Int64DataType.new.build_array(0..10)
left_table = Arrow::Table.new('col1' => left_array)
left_node = plan.build_source_node(left_table)
right_array = Arrow::Int64DataType.new.build_array(0..5)
right_table = Arrow::Table.new('col2' => right_array)
right_node = plan.build_source_node(right_table)
plan.build_hash_join_node(left_node, right_node,
Arrow::HashJoinNodeOptions.new(:left_outer, ['col1'], ['col2']))
end
def get_result(plan, node)
sink_node_options = Arrow::SinkNodeOptions.new
plan.build_sink_node(node, sink_node_options)
plan.validate
plan.start
plan.wait
reader = sink_node_options.get_reader(node.output_schema)
reader.read_all
end
plan = Arrow::ExecutePlan.new
node = build_join(plan)
GC.start
result = get_result(plan, node)
p result
```
This prints an empty table on my computer (!?), but if I remove the line
with `GC.start` it works. I said earlier that `share_input` wouldn't really
work, but it would. It is just that code would need to be refactored in an
awkward way to get access to `left_table` and `right_table`.
--
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]