pitrou commented on code in PR #36256:
URL: https://github.com/apache/arrow/pull/36256#discussion_r1241832493


##########
cpp/src/arrow/compute/kernels/scalar_if_else_benchmark.cc:
##########
@@ -57,9 +57,45 @@ struct GetBytesProcessed<Type, enable_if_base_binary<Type>> {
   }
 };
 
+template <typename DataType>
+struct GetBytesProcessed<DataType, enable_if_list_like<DataType>> {
+  static int64_t Get(const std::shared_ptr<Array>& arr) {
+    using OffsetType = typename TypeTraits<DataType>::OffsetType::c_type;
+
+    int64_t total_bytes = 0;
+    if constexpr (DataType::type_id == Type::LIST ||
+                  DataType::type_id == Type::LARGE_LIST) {
+      total_bytes += (arr->length() + 1) * sizeof(OffsetType);
+    } else {
+      ADD_FAILURE() << "GetBytesProcessed dispatching not implemented for "

Review Comment:
   One alternative is (you need to include `arrow/util/logging.h` if not 
already done):
   ```suggestion
         ARROW_LOG(FATAL) << "GetBytesProcessed dispatching not implemented for 
"
   ```



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

Reply via email to