You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/10/27 10:55:49 UTC

[GitHub] [arrow] AlenkaF commented on pull request #14493: ARROW-17360: [Python] Reorder columns in pyarrow.feather.read_table

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

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