kou commented on code in PR #49209:
URL: https://github.com/apache/arrow/pull/49209#discussion_r2790854189


##########
ruby/red-arrow-format/test/test-writer.rb:
##########
@@ -996,35 +919,23 @@ def test_write
 class TestFileWriter < Test::Unit::TestCase
   include WriterTests
 
-  def setup
-    Dir.mktmpdir do |tmp_dir|
-      path = File.join(tmp_dir, "data.arrow")
-      File.open(path, "wb") do |output|
-        writer = ArrowFormat::FileWriter.new(output)
-        write(writer)
-      end
-      data = File.open(path, "rb", &:read).freeze
-      table = Arrow::Table.load(Arrow::Buffer.new(data), format: :arrow)
-      @type = table.value.data_type
-      @values = table.value.values
-    end
+  def file_extension
+    "arrow"
+  end
+
+  def writer_class
+    ArrowFormat::FileWriter
   end
 end
 
 class TestStreamingWriter < Test::Unit::TestCase
   include WriterTests
 
-  def setup
-    Dir.mktmpdir do |tmp_dir|
-      path = File.join(tmp_dir, "data.arrows")
-      File.open(path, "wb") do |output|
-        writer = ArrowFormat::StreamingWriter.new(output)
-        write(writer)
-      end
-      data = File.open(path, "rb", &:read).freeze
-      table = Arrow::Table.load(Arrow::Buffer.new(data), format: :arrows)
-      @type = table.value.data_type
-      @values = table.value.values
-    end
+  def file_extension
+    "arrows"

Review Comment:
   Yes.
   
   https://arrow.apache.org/docs/format/Columnar.html#ipc-streaming-format
   
   > We recommend the “.arrows” file extension for the streaming format 
although in many cases these streams will not ever be stored as files.



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