Skip to content

Commit 69a054a

Browse files
authored
Simplify Ruby client example (#22)
1 parent 3d7c441 commit 69a054a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

http/get_simple/ruby/client/client.rb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,8 @@
2121
uri = URI("http://localhost:8008")
2222

2323
start = Time.now
24-
arrows_data = Net::HTTP.get(uri)
25-
input = Arrow::BufferInputStream.new(arrows_data)
26-
reader = Arrow::RecordBatchStreamReader.new(input)
27-
schema = reader.schema
28-
table = reader.read_all
24+
arrows_data = Net::HTTP.get(uri).freeze
25+
table = Arrow::Table.load(Arrow::Buffer.new(arrows_data), format: :arrows)
2926
elapsed_time = Time.now - start
3027

3128
n_received_record_batches = table[0].data.n_chunks

0 commit comments

Comments
 (0)