Skip to content
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

[C++][Parquet] Improve error message in append_row_groups() when appending disjoint metadata #31806

Closed
asfimport opened this issue May 1, 2022 · 2 comments

Comments

@asfimport
Copy link
Collaborator

Currently if you try to append together metadata from row groups with different schemas (?), you get the following error:

  File "/home/mmilton/.conda/envs/mmilton/envs/driverpipe/lib/python3.9/site-packages/dask/dataframe/io/parquet/arrow.py", line 52, in _append_row_groups
    metadata.append_row_groups(md)
  File "pyarrow/_parquet.pyx", line 628, in pyarrow._parquet.FileMetaData.append_row_groups
    self._metadata.AppendRowGroups(deref(c_metadata))
RuntimeError: AppendRowGroups requires equal schemas.

What would be useful here is to actually pass the schema difference in the error object in terms of which columns disagree. This information should also be in the error message.

For example if it said:

RuntimeError: AppendRowGroups requires equal schemas. Column "foo" was previously an int32 but the latest row group is storing it as an int64

Reporter: Michael Milton
Assignee: Miles Granger / @milesgranger

PRs and other links:

Note: This issue was originally created as ARROW-16431. Please see the migration documentation for further details.

@asfimport
Copy link
Collaborator Author

Joris Van den Bossche / @jorisvandenbossche:
[~multimeric] thanks for opening the issue. That would indeed be a welcome improvement of the error message (or at least we could print the two schemas, if it is not that easy to infer the exact difference between both).

@asfimport
Copy link
Collaborator Author

Antoine Pitrou / @pitrou:
Issue resolved by pull request 14029
#14029

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants