You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "kou (via GitHub)" <gi...@apache.org> on 2024/01/02 15:12:52 UTC

Re: [PR] GH-39225: [GLib] Use Cast() instaed of CastTo [arrow]

kou commented on code in PR #39228:
URL: https://github.com/apache/arrow/pull/39228#discussion_r1439542060


##########
c_glib/arrow-glib/scalar.cpp:
##########
@@ -385,9 +387,9 @@ garrow_scalar_cast(GArrowScalar *scalar,
 {
   const auto arrow_scalar = garrow_scalar_get_raw(scalar);
   const auto arrow_data_type = garrow_data_type_get_raw(data_type);
-  auto arrow_casted_scalar_result = arrow_scalar->CastTo(arrow_data_type);
+  auto arrow_casted_scalar_result = arrow::compute::Cast(*arrow_scalar, arrow_data_type);

Review Comment:
   ```suggestion
     auto arrow_casted_scalar_result = arrow::compute::Cast(arrow_scalar, arrow_data_type);
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org