-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Python][C++][Parquet] Support reading Parquet files having a permutation of column order #18353
Comments
Uwe Korn / @xhochy: |
Wes McKinney / @wesm: |
Joris Van den Bossche / @jorisvandenbossche: import pyarrow as pa
import pyarrow.parquet as pq
import pyarrow.dataset as ds
# create dummy dataset with column order permutation
import pathlib
basedir = pathlib.Path(".")
case = basedir / "dataset_column_order_permutation"
case.mkdir(exist_ok=True)
table1 = pa.table([[1, 2, 3], [.1, .2, .3]], names=['a', 'b'])
pq.write_table(table1, case / "data1.parquet")
table2 = pa.table([[.4, .5, .6], [4, 5, 6]], names=['b', 'a'])
pq.write_table(table2, case / "data2.parquet")
# reading with the old python implementation indeed raises on schema mismatch
pq.read_table(str(case))
# this reads fine
ds.dataset(str(case)).to_table().to_pandas() So once we use the datasets API under the hood in pyarrow.parquet (ARROW-8039), this issue should be solved (we can still add a test for it to close this issue) |
Antoine Pitrou / @pitrou: |
Joris Van den Bossche / @jorisvandenbossche: |
Joris Van den Bossche / @jorisvandenbossche: |
See discussion in dask/fastparquet#320
Reporter: Wes McKinney / @wesm
Assignee: Alenka Frim / @AlenkaF
Related issues:
PRs and other links:
Note: This issue was originally created as ARROW-2366. Please see the migration documentation for further details.
The text was updated successfully, but these errors were encountered: