Skip to content

Commit

Permalink
arrow: use Arrow::RecordBatchStreamReader#read_all
Browse files Browse the repository at this point in the history
For empty record case.
  • Loading branch information
kou committed Feb 6, 2024
1 parent ff37133 commit 5f68507
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/grntest/test-runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -714,9 +714,8 @@ def normalize_apache_arrow_content(content, options)
Arrow::BufferInputStream.open(buffer) do |input|
while input.tell < content.bytesize
reader = Arrow::RecordBatchStreamReader.new(input)
schema = reader.schema
record_batches = reader.to_a
table = Arrow::Table.new(schema, record_batches)
table = reader.read_all
schema = table.schema
unless normalized.empty?
normalized << "=" * 40
normalized << "\n"
Expand Down

0 comments on commit 5f68507

Please sign in to comment.