kshitij12345 commented on code in PR #13629:
URL: https://github.com/apache/arrow/pull/13629#discussion_r922893873
##########
python/pyarrow/tests/parquet/test_metadata.py:
##########
@@ -531,3 +532,19 @@ def test_metadata_exceeds_message_size():
buf = out.getvalue()
metadata = pq.read_metadata(pa.BufferReader(buf))
+
+
+def test_metadata_schema_filesystem(tmpdir):
+ table = pa.table({"a": [1, 2, 3]})
+
+ # URI writing to local file.
+ file_path = 'file:///' + os.path.join(str(tmpdir), "data.parquet")
+
+ pq.write_table(table, file_path)
+
+ # Get expected `metadata` from path.
+ metadata = pq.read_metadata(tmpdir / '/data.parquet')
Review Comment:
I tried that but it leads to segfault. Probably worth an issue? (I don't
think the program should crash)
<details>
<summary> Crash Log </summary>
```
python/pyarrow/tests/parquet/test_metadata.py
.........................sFatal Python error: Segmentation fault
Current thread 0x00007f066e2be740 (most recent call first):
File
"/home/kshiteej/Apache/arrow/python/pyarrow/tests/parquet/test_metadata.py",
line 549 in test_metadata_schema_filesystem
File
"/home/kshiteej/.conda/envs/pyarrow-dev/lib/python3.9/site-packages/_pytest/python.py",
line 192 in pytest_pyfunc_call
File
"/home/kshiteej/.conda/envs/pyarrow-dev/lib/python3.9/site-packages/pluggy/_callers.py",
line 39 in _multicall
File
"/home/kshiteej/.conda/envs/pyarrow-dev/lib/python3.9/site-packages/pluggy/_manager.py",
line 80 in _hookexec
File
"/home/kshiteej/.conda/envs/pyarrow-dev/lib/python3.9/site-packages/pluggy/_hooks.py",
line 265 in __call__
File
"/home/kshiteej/.conda/envs/pyarrow-dev/lib/python3.9/site-packages/_pytest/python.py",
line 1761 in runtest
File
"/home/kshiteej/.conda/envs/pyarrow-dev/lib/python3.9/site-packages/_pytest/runner.py",
line 166 in pytest_runtest_call
File
"/home/kshiteej/.conda/envs/pyarrow-dev/lib/python3.9/site-packages/pluggy/_callers.py",
line 39 in _multicall
File
"/home/kshiteej/.conda/envs/pyarrow-dev/lib/python3.9/site-packages/pluggy/_manager.py",
line 80 in _hookexec
File
"/home/kshiteej/.conda/envs/pyarrow-dev/lib/python3.9/site-packages/pluggy/_hooks.py",
line 265 in __call__
File
"/home/kshiteej/.conda/envs/pyarrow-dev/lib/python3.9/site-packages/_pytest/runner.py",
line 259 in <lambda>
File
"/home/kshiteej/.conda/envs/pyarrow-dev/lib/python3.9/site-packages/_pytest/runner.py",
line 338 in from_call
File
"/home/kshiteej/.conda/envs/pyarrow-dev/lib/python3.9/site-packages/_pytest/runner.py",
line 258 in call_runtest_hook
File
"/home/kshiteej/.conda/envs/pyarrow-dev/lib/python3.9/site-packages/_pytest/runner.py",
line 219 in call_and_report
File
"/home/kshiteej/.conda/envs/pyarrow-dev/lib/python3.9/site-packages/_pytest/runner.py",
line 130 in runtestprotocol
File
"/home/kshiteej/.conda/envs/pyarrow-dev/lib/python3.9/site-packages/_pytest/runner.py",
line 111 in pytest_runtest_protocol
File
"/home/kshiteej/.conda/envs/pyarrow-dev/lib/python3.9/site-packages/pluggy/_callers.py",
line 39 in _multicall
File
"/home/kshiteej/.conda/envs/pyarrow-dev/lib/python3.9/site-packages/pluggy/_manager.py",
line 80 in _hookexec
File
"/home/kshiteej/.conda/envs/pyarrow-dev/lib/python3.9/site-packages/pluggy/_hooks.py",
line 265 in __call__
File
"/home/kshiteej/.conda/envs/pyarrow-dev/lib/python3.9/site-packages/_pytest/main.py",
line 347 in pytest_runtestloop
File
"/home/kshiteej/.conda/envs/pyarrow-dev/lib/python3.9/site-packages/pluggy/_callers.py",
line 39 in _multicall
File
"/home/kshiteej/.conda/envs/pyarrow-dev/lib/python3.9/site-packages/pluggy/_manager.py",
line 80 in _hookexec
File
"/home/kshiteej/.conda/envs/pyarrow-dev/lib/python3.9/site-packages/pluggy/_hooks.py",
line 265 in __call__
File
"/home/kshiteej/.conda/envs/pyarrow-dev/lib/python3.9/site-packages/_pytest/main.py",
line 322 in _main
File
"/home/kshiteej/.conda/envs/pyarrow-dev/lib/python3.9/site-packages/_pytest/main.py",
line 268 in wrap_session
File
"/home/kshiteej/.conda/envs/pyarrow-dev/lib/python3.9/site-packages/_pytest/main.py",
line 315 in pytest_cmdline_main
File
"/home/kshiteej/.conda/envs/pyarrow-dev/lib/python3.9/site-packages/pluggy/_callers.py",
line 39 in _multicall
File
"/home/kshiteej/.conda/envs/pyarrow-dev/lib/python3.9/site-packages/pluggy/_manager.py",
line 80 in _hookexec
File
"/home/kshiteej/.conda/envs/pyarrow-dev/lib/python3.9/site-packages/pluggy/_hooks.py",
line 265 in __call__
File
"/home/kshiteej/.conda/envs/pyarrow-dev/lib/python3.9/site-packages/_pytest/config/__init__.py",
line 164 in main
File
"/home/kshiteej/.conda/envs/pyarrow-dev/lib/python3.9/site-packages/_pytest/config/__init__.py",
line 187 in console_main
File "/home/kshiteej/.conda/envs/pyarrow-dev/bin/pytest", line 11 in
<module>
Segmentation fault (core dumped)
```
</details>
--
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]