MCPcopy Create free account
hub / github.com/apache/arrow / setup

Method setup

c_glib/test/test-record-batch-iterator.rb:21–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19 include Helper::Buildable
20
21 def setup
22 fields = [
23 Arrow::Field.new("visible", Arrow::BooleanDataType.new),
24 Arrow::Field.new("point", Arrow::Int32DataType.new),
25 ]
26 schema = Arrow::Schema.new(fields)
27 @record_batches = [
28 [
29 build_boolean_array([true, false, true]),
30 build_int32_array([1, 2, 3]),
31 ],
32 [
33 build_boolean_array([false, true, false, true]),
34 build_int32_array([-1, -2, -3, -4]),
35 ]
36 ].collect do |columns|
37 Arrow::RecordBatch.new(schema, columns[0].length, columns)
38 end
39 @iterator = Arrow::RecordBatchIterator.new(@record_batches)
40 end
41
42 def test_next
43 assert_equal(@record_batches[0], @iterator.next)

Callers

nothing calls this directly

Calls 2

newMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected