You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "otegami (via GitHub)" <gi...@apache.org> on 2023/06/10 17:09:32 UTC

[GitHub] [arrow] otegami opened a new pull request, #36022: GH-36008: [Ruby] [Parquet] Add Parquet::ArrowFileReader#each_row_group

otegami opened a new pull request, #36022:
URL: https://github.com/apache/arrow/pull/36022

   ### Rationale for this change
   This change allows you to read a large Parquet file per row group.
   - ref: https://github.com/apache/arrow/issues/36001
   
   ### What changes are included in this PR?
   - Add Parquet::ArrowFileReader#each_row_group
   - Add the related test about it
   
   ### Are these changes tested?
   Yes
   - I don't have confidence about the test. Could you give me a comment?
   
   ### Are there any user-facing changes?
   No
   
   Close: https://github.com/apache/arrow/issues/36008


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] otegami commented on a diff in pull request #36022: GH-36008: [Ruby] [Parquet] Add Parquet::ArrowFileReader#each_row_group

Posted by "otegami (via GitHub)" <gi...@apache.org>.
otegami commented on code in PR #36022:
URL: https://github.com/apache/arrow/pull/36022#discussion_r1225709859


##########
ruby/red-parquet/test/test-arrow-file-reader.rb:
##########
@@ -0,0 +1,56 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+class TestArrowFileReader < Test::Unit::TestCase
+  def setup
+    visible_field = Arrow::Field.new("visible", :boolean)
+    @schema = Arrow::Schema.new([visible_field])
+    visible_arrays = [Arrow::BooleanArray.new([true, false])]
+    visible_array = Arrow::ChunkedArray.new(visible_arrays)
+    table = Arrow::Table.new(@schema, [visible_array])
+    @file = Tempfile.open(["red-parquet", ".parquet"])
+    chunk_size = 1
+    writer = Parquet::ArrowFileWriter.new(table.schema, @file.path)
+    writer.write_table(table, chunk_size)
+    writer.close

Review Comment:
   fix: [4c228dd](https://github.com/apache/arrow/pull/36022/commits/4c228dd85612dcb8efc785427b1c798a205b5128)



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on a diff in pull request #36022: GH-36008: [Ruby] [Parquet] Add Parquet::ArrowFileReader#each_row_group

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #36022:
URL: https://github.com/apache/arrow/pull/36022#discussion_r1225548093


##########
ruby/red-parquet/test/test-arrow-file-reader.rb:
##########
@@ -0,0 +1,56 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+class TestArrowFileReader < Test::Unit::TestCase
+  def setup
+    visible_field = Arrow::Field.new("visible", :boolean)
+    @schema = Arrow::Schema.new([visible_field])
+    visible_arrays = [Arrow::BooleanArray.new([true, false])]
+    visible_array = Arrow::ChunkedArray.new(visible_arrays)
+    table = Arrow::Table.new(@schema, [visible_array])
+    @file = Tempfile.open(["red-parquet", ".parquet"])
+    chunk_size = 1
+    writer = Parquet::ArrowFileWriter.new(table.schema, @file.path)
+    writer.write_table(table, chunk_size)
+    writer.close

Review Comment:
   Could you use `Tempfile.create {...}` and `yield` in `setup` to remove a temporary file as soon as possible?
   
    ```suggestion
       Tempfile.create(["red-parquet", ".parquet"]) do |file|
         @file = file
         chunk_size = 1
         writer = Parquet::ArrowFileWriter.new(table.schema, @file.path)
         writer.write_table(table, chunk_size)
         writer.close
         yield
       end
   ```



##########
ruby/red-parquet/test/test-arrow-file-reader.rb:
##########
@@ -0,0 +1,56 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+class TestArrowFileReader < Test::Unit::TestCase
+  def setup
+    visible_field = Arrow::Field.new("visible", :boolean)
+    @schema = Arrow::Schema.new([visible_field])
+    visible_arrays = [Arrow::BooleanArray.new([true, false])]
+    visible_array = Arrow::ChunkedArray.new(visible_arrays)
+    table = Arrow::Table.new(@schema, [visible_array])
+    @file = Tempfile.open(["red-parquet", ".parquet"])
+    chunk_size = 1
+    writer = Parquet::ArrowFileWriter.new(table.schema, @file.path)
+    writer.write_table(table, chunk_size)
+    writer.close
+  end
+
+  sub_test_case("#each_row_group") do
+    test("without block") do
+      first_visible_arrays = [Arrow::BooleanArray.new([true])]
+      first_visible_array = Arrow::ChunkedArray.new(first_visible_arrays)
+      second_visible_arrays = [Arrow::BooleanArray.new([false])]
+      second_visible_array = Arrow::ChunkedArray.new(second_visible_arrays)
+
+      Arrow::FileInputStream.open(@file.path) do |input|
+        reader = Parquet::ArrowFileReader.new(input)
+        each_row_group = reader.each_row_group
+        assert_equal({
+                       size: 2,
+                       to_a: [
+                         Arrow::Table.new(@schema, [first_visible_array]),
+                         Arrow::Table.new(@schema, [second_visible_array])

Review Comment:
   We can simplify this:
   
   ```suggestion
         Arrow::FileInputStream.open(@file.path) do |input|
           reader = Parquet::ArrowFileReader.new(input)
           each_row_group = reader.each_row_group
           assert_equal({
                          size: 2,
                          to_a: [
                            Arrow::Table.new(@schema, [[true]]),
                            Arrow::Table.new(@schema, [[false]])
   ```



##########
ruby/red-parquet/test/test-arrow-file-reader.rb:
##########
@@ -0,0 +1,56 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+class TestArrowFileReader < Test::Unit::TestCase
+  def setup
+    visible_field = Arrow::Field.new("visible", :boolean)
+    @schema = Arrow::Schema.new([visible_field])

Review Comment:
   We can simplify this:
   
   ```suggestion
       @schema = Arrow::Schema.new(visible: :boolean)
   ```



##########
ruby/red-parquet/test/test-arrow-file-reader.rb:
##########
@@ -0,0 +1,56 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+class TestArrowFileReader < Test::Unit::TestCase
+  def setup
+    visible_field = Arrow::Field.new("visible", :boolean)
+    @schema = Arrow::Schema.new([visible_field])
+    visible_arrays = [Arrow::BooleanArray.new([true, false])]
+    visible_array = Arrow::ChunkedArray.new(visible_arrays)
+    table = Arrow::Table.new(@schema, [visible_array])

Review Comment:
   we can simplify this:
   
   ```suggestion
       table = Arrow::Table.new(@schema, [[true], [false]])
   ```



##########
ruby/red-parquet/test/test-arrow-file-reader.rb:
##########
@@ -0,0 +1,56 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+class TestArrowFileReader < Test::Unit::TestCase
+  def setup
+    visible_field = Arrow::Field.new("visible", :boolean)
+    @schema = Arrow::Schema.new([visible_field])
+    visible_arrays = [Arrow::BooleanArray.new([true, false])]
+    visible_array = Arrow::ChunkedArray.new(visible_arrays)
+    table = Arrow::Table.new(@schema, [visible_array])
+    @file = Tempfile.open(["red-parquet", ".parquet"])
+    chunk_size = 1
+    writer = Parquet::ArrowFileWriter.new(table.schema, @file.path)
+    writer.write_table(table, chunk_size)
+    writer.close

Review Comment:
   Could you use more Ruby-ish `ArrowFileWriter.open {...}` API?
   
   ```suggestion
       Parquet::ArrowFileWriter.open(table.schema, @file.path) do |writer|
         chunk_size = 1
         writer.write_table(table, chunk_size)
       end
   ```



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] github-actions[bot] commented on pull request #36022: GH-36008: [Ruby] [Parquet] Add Parquet::ArrowFileReader#each_row_group

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #36022:
URL: https://github.com/apache/arrow/pull/36022#issuecomment-1585740217

   :warning: GitHub issue #36008 **has been automatically assigned in GitHub** to PR creator.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] otegami commented on a diff in pull request #36022: GH-36008: [Ruby] [Parquet] Add Parquet::ArrowFileReader#each_row_group

Posted by "otegami (via GitHub)" <gi...@apache.org>.
otegami commented on code in PR #36022:
URL: https://github.com/apache/arrow/pull/36022#discussion_r1225710022


##########
ruby/red-parquet/test/test-arrow-file-reader.rb:
##########
@@ -0,0 +1,56 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+class TestArrowFileReader < Test::Unit::TestCase
+  def setup
+    visible_field = Arrow::Field.new("visible", :boolean)
+    @schema = Arrow::Schema.new([visible_field])
+    visible_arrays = [Arrow::BooleanArray.new([true, false])]
+    visible_array = Arrow::ChunkedArray.new(visible_arrays)
+    table = Arrow::Table.new(@schema, [visible_array])

Review Comment:
   fix: [5c44ad6](https://github.com/apache/arrow/pull/36022/commits/5c44ad6bf9ade1fa26dfbdf0e5c57021c587dfd5)



##########
ruby/red-parquet/test/test-arrow-file-reader.rb:
##########
@@ -0,0 +1,56 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+class TestArrowFileReader < Test::Unit::TestCase
+  def setup
+    visible_field = Arrow::Field.new("visible", :boolean)
+    @schema = Arrow::Schema.new([visible_field])

Review Comment:
   fix: [5c44ad6](https://github.com/apache/arrow/pull/36022/commits/5c44ad6bf9ade1fa26dfbdf0e5c57021c587dfd5)



##########
ruby/red-parquet/test/test-arrow-file-reader.rb:
##########
@@ -0,0 +1,56 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+class TestArrowFileReader < Test::Unit::TestCase
+  def setup
+    visible_field = Arrow::Field.new("visible", :boolean)
+    @schema = Arrow::Schema.new([visible_field])
+    visible_arrays = [Arrow::BooleanArray.new([true, false])]
+    visible_array = Arrow::ChunkedArray.new(visible_arrays)
+    table = Arrow::Table.new(@schema, [visible_array])
+    @file = Tempfile.open(["red-parquet", ".parquet"])
+    chunk_size = 1
+    writer = Parquet::ArrowFileWriter.new(table.schema, @file.path)
+    writer.write_table(table, chunk_size)
+    writer.close
+  end
+
+  sub_test_case("#each_row_group") do
+    test("without block") do
+      first_visible_arrays = [Arrow::BooleanArray.new([true])]
+      first_visible_array = Arrow::ChunkedArray.new(first_visible_arrays)
+      second_visible_arrays = [Arrow::BooleanArray.new([false])]
+      second_visible_array = Arrow::ChunkedArray.new(second_visible_arrays)
+
+      Arrow::FileInputStream.open(@file.path) do |input|
+        reader = Parquet::ArrowFileReader.new(input)
+        each_row_group = reader.each_row_group
+        assert_equal({
+                       size: 2,
+                       to_a: [
+                         Arrow::Table.new(@schema, [first_visible_array]),
+                         Arrow::Table.new(@schema, [second_visible_array])

Review Comment:
   fix: [5c44ad6](https://github.com/apache/arrow/pull/36022/commits/5c44ad6bf9ade1fa26dfbdf0e5c57021c587dfd5)



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] otegami commented on pull request #36022: GH-36008: [Ruby] [Parquet] Add Parquet::ArrowFileReader#each_row_group

Posted by "otegami (via GitHub)" <gi...@apache.org>.
otegami commented on PR #36022:
URL: https://github.com/apache/arrow/pull/36022#issuecomment-1586021839

   @kou 
   Thank you for reviewing 🙏
   I've fixed all points you commented on.
   Fix: [d18ade2](https://github.com/apache/arrow/pull/36022/commits/d18ade28a711f9580f0d414ac68dddc84a81e7fc): added a test case about 'with block'.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] ursabot commented on pull request #36022: GH-36008: [Ruby][Parquet] Add Parquet::ArrowFileReader#each_row_group

Posted by "ursabot (via GitHub)" <gi...@apache.org>.
ursabot commented on PR #36022:
URL: https://github.com/apache/arrow/pull/36022#issuecomment-1586527195

   Benchmark runs are scheduled for baseline = 13a35ed1fe5e1158428cf5d132e4f690a3edb8f6 and contender = ae655c5ccb8d4bec1acd0f6d50855a6dea1590c1. ae655c5ccb8d4bec1acd0f6d50855a6dea1590c1 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
   Conbench compare runs links:
   [Finished :arrow_down:0.0% :arrow_up:0.0%] [ec2-t3-xlarge-us-east-2](https://conbench.ursa.dev/compare/runs/4b1181a2ef3b465489133d9257c7ca32...bc3b2b259d7a4be5aeb93256a161ec55/)
   [Finished :arrow_down:0.91% :arrow_up:0.0%] [test-mac-arm](https://conbench.ursa.dev/compare/runs/e5554110c337482ab971d9f7c647e649...5832792f543b469b945f38ea52eb408d/)
   [Finished :arrow_down:0.0% :arrow_up:0.0%] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/b68c6efa681d44c180d84dbf42c923c0...76780b49d74b45f9ae18e2b5981de5e9/)
   [Finished :arrow_down:0.21% :arrow_up:0.09%] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/e69ecdcb3c914b3bb3e2768ab54284cf...4d47e5612317432b9f0d486f1c92eb2f/)
   Buildkite builds:
   [Finished] [`ae655c5c` ec2-t3-xlarge-us-east-2](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/3023)
   [Finished] [`ae655c5c` test-mac-arm](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/3059)
   [Finished] [`ae655c5c` ursa-i9-9960x](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/3024)
   [Finished] [`ae655c5c` ursa-thinkcentre-m75q](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/3049)
   [Finished] [`13a35ed1` ec2-t3-xlarge-us-east-2](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/3022)
   [Finished] [`13a35ed1` test-mac-arm](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/3058)
   [Finished] [`13a35ed1` ursa-i9-9960x](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/3023)
   [Finished] [`13a35ed1` ursa-thinkcentre-m75q](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/3048)
   Supported benchmarks:
   ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
   test-mac-arm: Supported benchmark langs: C++, Python, R
   ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
   ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java
   


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou merged pull request #36022: GH-36008: [Ruby][Parquet] Add Parquet::ArrowFileReader#each_row_group

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou merged PR #36022:
URL: https://github.com/apache/arrow/pull/36022


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] otegami commented on a diff in pull request #36022: GH-36008: [Ruby] [Parquet] Add Parquet::ArrowFileReader#each_row_group

Posted by "otegami (via GitHub)" <gi...@apache.org>.
otegami commented on code in PR #36022:
URL: https://github.com/apache/arrow/pull/36022#discussion_r1225709714


##########
ruby/red-parquet/test/test-arrow-file-reader.rb:
##########
@@ -0,0 +1,56 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+class TestArrowFileReader < Test::Unit::TestCase
+  def setup
+    visible_field = Arrow::Field.new("visible", :boolean)
+    @schema = Arrow::Schema.new([visible_field])
+    visible_arrays = [Arrow::BooleanArray.new([true, false])]
+    visible_array = Arrow::ChunkedArray.new(visible_arrays)
+    table = Arrow::Table.new(@schema, [visible_array])
+    @file = Tempfile.open(["red-parquet", ".parquet"])
+    chunk_size = 1
+    writer = Parquet::ArrowFileWriter.new(table.schema, @file.path)
+    writer.write_table(table, chunk_size)
+    writer.close

Review Comment:
   fix: [0659e9c](https://github.com/apache/arrow/pull/36022/commits/0659e9c63cdd690b6fae9dd5c0bfc28139f7801b)



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org