Commit 46b033f
authored
### Rationale for this change
See #47728. Check `source` argument in `pyarrow.parquet.read_table` if `pyarrow.dataset` is not available.
### What changes are included in this PR?
Check the `source` argument, raise `ValueError` if the `source` argument is either a list of `.parquet` files or a directory.
### Are these changes tested?
Yes
### Are there any user-facing changes?
No
In case if the `source` argument is a directory, I decided not to check it directly, but to catch the exceptions coming from the `fs.open_input_file`, since it already checks for it, and add extra exception on top of the stack that explains the actual reason.
* GitHub Issue: #47728
Authored-by: Bogdan Romenskii <[email protected]>
Signed-off-by: Raúl Cumplido <[email protected]>
1 parent f5b3fc7 commit 46b033f
2 files changed
+26
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1887 | 1887 | | |
1888 | 1888 | | |
1889 | 1889 | | |
| 1890 | + | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
| 1895 | + | |
1890 | 1896 | | |
1891 | 1897 | | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
1892 | 1905 | | |
1893 | | - | |
| 1906 | + | |
1894 | 1907 | | |
1895 | 1908 | | |
1896 | 1909 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
185 | 186 | | |
186 | 187 | | |
187 | 188 | | |
188 | | - | |
189 | | - | |
| 189 | + | |
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| |||
993 | 993 | | |
994 | 994 | | |
995 | 995 | | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
0 commit comments