Taepper commented on code in PR #46926:
URL: https://github.com/apache/arrow/pull/46926#discussion_r2720534861
##########
c_glib/arrow-glib/compute.cpp:
##########
@@ -4334,8 +4402,8 @@ garrow_rank_options_set_property(GObject *object,
switch (prop_id) {
case PROP_RANK_OPTIONS_NULL_PLACEMENT:
- options->null_placement =
- static_cast<arrow::compute::NullPlacement>(g_value_get_enum(value));
+ options->null_placement = garrow_optional_null_placement_to_raw(
+ static_cast<GArrowOptionalNullPlacement>(g_value_get_enum(value)));
Review Comment:
This would be missing a static_cast:
```
{
auto null_placement =
static_cast<GArrowOptionalNullPlacement>(g_value_get_enum(value));
if (null_placement == GARROW_OPTIONAL_NULL_PLACEMENT_UNSPECIFIED) {
options->null_placement = std::nullopt;
} else {
options->null_placement =
static_cast<arrow::compute::NullPlacement>(null_placement);
}
}
```
Are you sure this is the cleaner way to go? Should I replace all usage of
the helper function `garrow_optional_null_placement_to_raw` like this?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]