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

Cleanup ORC chunked writer #13091

Merged
merged 7 commits into from
Apr 12, 2023
Merged

Conversation

ttnghia
Copy link
Contributor

@ttnghia ttnghia commented Apr 7, 2023

This changes the internal variables of ORC chunked writer:

  • Renaming them to have a _ prefix consistently.
  • Add const qualifier to some variables that are writer parameters.
  • Regroup them.

There is not any new implementation added. However, the unused parameter mr is removed from its interface thus this is flagged as breaking changes.

Closes:

@ttnghia ttnghia added 3 - Ready for Review Ready for review by team code quality libcudf Affects libcudf (C++/CUDA) code. cuIO cuIO issue non-breaking Non-breaking change labels Apr 7, 2023
@ttnghia ttnghia requested a review from a team as a code owner April 7, 2023 20:03
@ttnghia ttnghia self-assigned this Apr 7, 2023
@ttnghia ttnghia added the improvement Improvement / enhancement to an existing function label Apr 7, 2023
@ttnghia ttnghia added breaking Breaking change and removed non-breaking Non-breaking change labels Apr 7, 2023
Copy link
Contributor

@vyasr vyasr left a comment

Choose a reason for hiding this comment

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

The improved consistency is good, but isn't the leading underscore a bit redundant in C++ where the private access specifier already conveys that these are internal variables?

@ttnghia
Copy link
Contributor Author

ttnghia commented Apr 11, 2023

The improved consistency is good, but isn't the leading underscore a bit redundant in C++ where the private access specifier already conveys that these are internal variables?

Consider the situations like this:

var1.member1 = func(_var2);

vs this:

var1.member1 = func(var2);

In the first situation, you can immediately recognize that we are changing a local variable by applying func on a member variable. On the other hand, the second situation can't tell you that. You have to dig into the code to find out what is var1 and var2 to understand it.

The underscore added to member variables is for the sheer clearness to help working on the code better, not to mean for any correctness.

@ttnghia
Copy link
Contributor Author

ttnghia commented Apr 11, 2023

/merge

@rapids-bot rapids-bot bot merged commit ecadda5 into rapidsai:branch-23.06 Apr 12, 2023
@ttnghia ttnghia deleted the cleanup_orc_writer branch April 12, 2023 02:40
rapids-bot bot pushed a commit that referenced this pull request Apr 12, 2023
Similar to #13091, this changes the internal variables of Parquet chunked writer:
 * Renaming them to have a `_` prefix consistently.
 * Add `const` qualifier to some variables that are writer parameters.
 * Regroup them.

There is not any new implementation added. However, the unused parameter `mr` is removed from its interface thus this is flagged as breaking changes.

Closes:
 * #13079

Authors:
  - Nghia Truong (https://github.com/ttnghia)

Approvers:
  - Mike Wilson (https://github.com/hyperbolic2346)
  - Karthikeyan (https://github.com/karthikeyann)

URL: #13094
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 breaking Breaking change cuIO cuIO issue improvement Improvement / enhancement to an existing function libcudf Affects libcudf (C++/CUDA) code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEA] Consistently use prefix/suffix for member variables of cudf::io::detail::orc::writer::impl
3 participants