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

Method write_table

c_glib/test/helper/writable.rb:20–41  ·  view source on GitHub ↗
(table, output, type: :file)

Source from the content-addressed store, hash-verified

18module Helper
19 module Writable
20 def write_table(table, output, type: :file)
21 if output.is_a?(Arrow::Buffer)
22 output_stream = Arrow::BufferOutputStream.new(output)
23 else
24 output_stream = Arrow::FileOutputStream.new(output, false)
25 end
26 begin
27 if type == :file
28 writer_class = Arrow::RecordBatchFileWriter
29 else
30 writer_class = Arrow::RecordBatchStreamWriter
31 end
32 writer = writer_class.new(output_stream, table.schema)
33 begin
34 writer.write_table(table)
35 ensure
36 writer.close
37 end
38 ensure
39 output_stream.close
40 end
41 end
42 end
43end

Callers 15

test_write_tableMethod · 0.45
test_write_tableMethod · 0.45
setupMethod · 0.45
setupMethod · 0.45
setupMethod · 0.45
setupMethod · 0.45
setupMethod · 0.45
setupMethod · 0.45
setupMethod · 0.45
setupMethod · 0.45
setupMethod · 0.45
setupMethod · 0.45

Calls 3

newMethod · 0.45
schemaMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected