AlenkaF commented on PR #14493:
URL: https://github.com/apache/arrow/pull/14493#issuecomment-1293348987
Yeah, that's unfortunate. `select()` with "dotted path" doesn't work for
`pyarrow.Table` but works for `ORCF.read()`:
```python
> result4 = orc_file.read(columns=["struct.middle.inner"])
opt/conda/envs/arrow/lib/python3.8/site-packages/pyarrow/tests/test_orc.py:584:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
opt/conda/envs/arrow/lib/python3.8/site-packages/pyarrow/orc.py:189: in read
table = table.select(columns)
pyarrow/table.pxi:3053: in pyarrow.lib.Table.select
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
> ???
E KeyError: 'Field "struct.middle.inner" does not exist in table schema'
```
Due to that the easy solution for reordering the columns isn't feasible
anymore. Will close this PR and make another one, where I will add information
to the docstrings that in `orc.read_table()` we always follow the order of the
file.
--
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]