pitrou commented on a change in pull request #8628:
URL: https://github.com/apache/arrow/pull/8628#discussion_r520725613



##########
File path: cpp/src/arrow/compute/kernels/scalar_fill_null.cc
##########
@@ -84,6 +84,52 @@ struct FillNullFunctor<Type, 
enable_if_t<is_number_type<Type>::value>> {
   }
 };
 
+template <typename Type>
+struct FillNullFunctor<Type, enable_if_t<is_base_binary_type<Type>::value>> {
+  using BuilderType = typename TypeTraits<Type>::BuilderType;
+
+  static void Exec(KernelContext* ctx, const ExecBatch& batch, Datum* out) {
+    const ArrayData& input = *batch[0].array();
+    const auto& fill_value_scalar =
+        checked_cast<const BaseBinaryScalar&>(*batch[1].scalar());
+    util::string_view fill_value =
+        static_cast<util::string_view>(*fill_value_scalar.value);

Review comment:
       The `static_cast` looks weird IMHO. How about using a constructor call?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to