adamreeve commented on code in PR #41750:
URL: https://github.com/apache/arrow/pull/41750#discussion_r1607923651


##########
c_glib/test/dataset/test-file-system-dataset.rb:
##########
@@ -56,6 +56,24 @@ def test_partitioning
   end
 
   def test_read_write
+    dataset, expected_table = create_dataset
+    assert_equal(expected_table, dataset.to_table)
+  end
+
+  def test_record_batch_reader
+    dataset, expected_table = create_dataset
+    reader = dataset.to_reader
+    record_batches = []
+    loop do
+      batch = reader.read_next
+      break if batch.nil?
+      record_batches << batch
+    end
+    table_from_batches = Arrow::Table.new(reader.schema, record_batches)
+    assert_equal(expected_table, table_from_batches)

Review Comment:
   That's much simpler thanks, not sure how I missed that :smile: 



-- 
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]

Reply via email to