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

Deprecate decimal_cols_as_float in ORC reader (C++ layer) #10152

Merged
merged 1 commit into from
Jan 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions cpp/include/cudf/io/orc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ class orc_reader_options {
*
* @param val Vector of fully qualified column names.
*/
void set_decimal_cols_as_float(std::vector<std::string> val)
[[deprecated(
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this add a compiler warning when building libcudf?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It should issue warnings only when the function is used.
https://en.cppreference.com/w/cpp/language/attributes/deprecated

Copy link
Contributor

Choose a reason for hiding this comment

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

I see. I read that page earlier but thought it was showing compiler output and not runtime output. Thanks for the correction.

"Decimal to float conversion is deprecated and will be remove in future release")]] void
set_decimal_cols_as_float(std::vector<std::string> val)
{
_decimal_cols_as_float = std::move(val);
}
Expand Down Expand Up @@ -344,7 +346,10 @@ class orc_reader_options_builder {
* @param val Vector of column names.
* @return this for chaining.
*/
orc_reader_options_builder& decimal_cols_as_float(std::vector<std::string> val)
[[deprecated(
"Decimal to float conversion is deprecated and will be remove in future "
"release")]] orc_reader_options_builder&
decimal_cols_as_float(std::vector<std::string> val)
{
options._decimal_cols_as_float = std::move(val);
return *this;
Expand Down