jorisvandenbossche commented on a change in pull request #11558:
URL: https://github.com/apache/arrow/pull/11558#discussion_r737295055
##########
File path: python/pyarrow/tests/test_feather.py
##########
@@ -192,6 +192,28 @@ def test_read_table(version):
assert_frame_equal(table.to_pandas(), result)
[email protected]
+def test_read_feather(version):
+ # ARROW-14470
+ num_values = (10, 10)
+ path = random_path()
+
+ TEST_FILES.append(path)
+
+ values = np.random.randint(0, 10, size=num_values)
+ columns = ['col_' + str(i) for i in range(10)]
+ table = pa.Table.from_arrays(values, columns)
+
+ write_feather(table, path, version=version)
+
+ result = read_feather(path)
+ assert_frame_equal(table.to_pandas(), result)
+
+ # Test with use_threads=False
+ result = read_feather(path, use_threads=False)
+ assert_frame_equal(table.to_pandas(), result)
+
Review comment:
Maybe in addition add `result = read_table(path, use_threads=False)` as
well, to explicitly test this function as well.
##########
File path: cpp/src/arrow/ipc/feather.cc
##########
@@ -778,7 +791,7 @@ Result<std::shared_ptr<Reader>> Reader::Open(
} else if (memcmp(buffer->data(), internal::kArrowMagicBytes,
Review comment:
Maybe add a comment three lines above (can't comment on that line ..)
that `options` is ignored for ReaderV1
##########
File path: python/pyarrow/tests/test_feather.py
##########
@@ -192,6 +192,28 @@ def test_read_table(version):
assert_frame_equal(table.to_pandas(), result)
[email protected]
+def test_read_feather(version):
Review comment:
```suggestion
def test_use_threads(version):
```
(to have a more descriptive test name)
--
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]