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

Return per-file metadata from readers #10782

Merged
merged 5 commits into from
May 9, 2022

Conversation

vuule
Copy link
Contributor

@vuule vuule commented May 4, 2022

Issue #10775

C++ side of the fix the the issue above.
Adds pref_file_user_data to table_metadata so that readers can return a map per file instead of merging maps from multiple input file into a single map, overwriting elements with the same key.

The original user_data member now holds the metadata from the first input file, instead of trying (and failing) to merge the maps.
Will be removed in the future. Got no good way to deprecate, as the table_metadata struct does not have encapsulation :(

"breaking" label because the logic of user_data changed. Not expected to impact and working code.

@github-actions github-actions bot added the libcudf Affects libcudf (C++/CUDA) code. label May 4, 2022
@vuule vuule self-assigned this May 4, 2022
@vuule vuule added feature request New feature or request non-breaking Non-breaking change cuIO cuIO issue labels May 4, 2022
@codecov
Copy link

codecov bot commented May 4, 2022

Codecov Report

Merging #10782 (88b08a2) into branch-22.06 (8d861ce) will increase coverage by 0.04%.
The diff coverage is 96.49%.

@@               Coverage Diff                @@
##           branch-22.06   #10782      +/-   ##
================================================
+ Coverage         86.40%   86.45%   +0.04%     
================================================
  Files               143      143              
  Lines             22448    22493      +45     
================================================
+ Hits              19396    19446      +50     
+ Misses             3052     3047       -5     
Impacted Files Coverage Δ
python/cudf/cudf/core/frame.py 93.41% <ø> (ø)
python/cudf/cudf/core/indexed_frame.py 91.70% <ø> (ø)
python/cudf/cudf/core/dataframe.py 93.77% <96.29%> (+0.08%) ⬆️
python/cudf/cudf/testing/_utils.py 94.05% <100.00%> (+0.06%) ⬆️
python/cudf/cudf/core/column/string.py 89.21% <0.00%> (+0.12%) ⬆️
python/cudf/cudf/core/groupby/groupby.py 91.79% <0.00%> (+0.22%) ⬆️
python/cudf/cudf/core/column/numerical.py 96.17% <0.00%> (+0.29%) ⬆️
python/cudf/cudf/core/tools/datetimes.py 84.49% <0.00%> (+0.30%) ⬆️
python/cudf/cudf/core/column/lists.py 92.91% <0.00%> (+0.83%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4913a9b...88b08a2. Read the comment docs.

@vuule vuule marked this pull request as ready for review May 4, 2022 02:18
@vuule vuule requested a review from a team as a code owner May 4, 2022 02:18
@vuule vuule requested review from karthikeyann and PointKernel May 4, 2022 02:18
cpp/src/io/parquet/reader_impl.cu Outdated Show resolved Hide resolved
Comment on lines +472 to +475
// Assumes that all input files have the same metadata
// TODO: verify this assumption
auto it = keyval_maps[0].find("pandas");
if (it != keyval_maps[0].end()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how it works if the first file is written by pandas (thus has index_columns) while the second one is written by cudf (has no index_columns). To be verified once the python changes have been finished.

@vuule vuule requested a review from PointKernel May 4, 2022 17:53
@vuule vuule added breaking Breaking change and removed non-breaking Non-breaking change labels May 4, 2022
cpp/include/cudf/io/types.hpp Outdated Show resolved Hide resolved
cpp/src/io/orc/reader_impl.cu Outdated Show resolved Hide resolved
@vuule vuule requested a review from karthikeyann May 6, 2022 22:21
@vuule
Copy link
Contributor Author

vuule commented May 7, 2022

rerun tests

@vuule
Copy link
Contributor Author

vuule commented May 9, 2022

@gpucibot merge

@rapids-bot rapids-bot bot merged commit c4ed468 into rapidsai:branch-22.06 May 9, 2022
@vuule vuule deleted the bug-pq-metadata-array branch May 9, 2022 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Breaking change cuIO cuIO issue feature request New feature or request libcudf Affects libcudf (C++/CUDA) code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants