Skip to content
/ cudf Public
forked from rapidsai/cudf

Commit

Permalink
Avoid deprecation warning in internal to_arrow code
Browse files Browse the repository at this point in the history
In rapidsai#16297, we deprecated the use of `to_arrow` in favour of
`to_arrow_host` and `to_arrow_device`. However, the scalar detail
overload of `to_arrow` used the public table overload. So we get a
warning when compiling internal libcudf code. Fix this by using the
detail API, and fix a bug along the way where we were not passing
through the arrow memory resource.
  • Loading branch information
wence- committed Jul 24, 2024
1 parent 743264f commit 2c073d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpp/src/interop/to_arrow.cu
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ std::shared_ptr<arrow::Scalar> to_arrow(cudf::scalar const& input,
{
auto const column = cudf::make_column_from_scalar(input, 1, stream);
cudf::table_view const tv{{column->view()}};
auto const arrow_table = cudf::to_arrow(tv, {metadata}, stream);
auto const arrow_table = detail::to_arrow(tv, {metadata}, stream, ar_mr);
auto const ac = arrow_table->column(0);
auto const maybe_scalar = ac->GetScalar(0);
if (!maybe_scalar.ok()) { CUDF_FAIL("Failed to produce a scalar"); }
Expand Down

0 comments on commit 2c073d9

Please sign in to comment.