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

Fix compile issue in json_chunked_reader.cpp #12280

Merged
merged 1 commit into from
Dec 1, 2022

Conversation

ttnghia
Copy link
Contributor

@ttnghia ttnghia commented Dec 1, 2022

This issue was introduced in #12017 merged, which triggers compiler error on some systems:

../tests/io/json_chunked_reader.cpp: In function 'std::vector<cudf::io::table_with_metadata> skeleton_for_parellel_chunk_reader(cudf::host_span<std::unique_ptr<cudf::io::datasource> >, const cudf::io::json_reader_options&, int32_t, rmm::cuda_stream_view, rmm::mr::device_memory_resource*)':
../tests/io/json_chunked_reader.cpp:78:19: error: loop variable '<structured bindings>' creates a copy from type 'const std::pair<int, int>' [-Werror=range-loop-construct]
   78 |   for (auto const [chunk_start, chunk_end] : record_ranges) {
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~
../tests/io/json_chunked_reader.cpp:78:19: note: use reference type to prevent copying
   78 |   for (auto const [chunk_start, chunk_end] : record_ranges) {
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~
      |                   &

Fixing it is just by following the compiler recommendation: "use reference type to prevent copying".

Signed-off-by: Nghia Truong <[email protected]>
@ttnghia ttnghia added bug Something isn't working 3 - Ready for Review Ready for review by team libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change labels Dec 1, 2022
@ttnghia ttnghia requested a review from a team as a code owner December 1, 2022 20:10
@ttnghia ttnghia self-assigned this Dec 1, 2022
@ttnghia ttnghia requested a review from karthikeyann December 1, 2022 20:10
@ttnghia ttnghia added tests Unit testing for project and removed libcudf Affects libcudf (C++/CUDA) code. labels Dec 1, 2022
@codecov
Copy link

codecov bot commented Dec 1, 2022

Codecov Report

❗ No coverage uploaded for pull request base (branch-23.02@8e0ee53). Click here to learn what that means.
Patch has no changes to coverable lines.

Additional details and impacted files
@@               Coverage Diff               @@
##             branch-23.02   #12280   +/-   ##
===============================================
  Coverage                ?   88.21%           
===============================================
  Files                   ?      137           
  Lines                   ?    22684           
  Branches                ?        0           
===============================================
  Hits                    ?    20011           
  Misses                  ?     2673           
  Partials                ?        0           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ttnghia
Copy link
Contributor Author

ttnghia commented Dec 1, 2022

@gpucibot merge

@rapids-bot rapids-bot bot merged commit e25eecb into rapidsai:branch-23.02 Dec 1, 2022
@ttnghia ttnghia deleted the fix_json_test branch December 1, 2022 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team bug Something isn't working non-breaking Non-breaking change tests Unit testing for project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants