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


##########
cpp/src/arrow/compute/kernels/scalar_if_else_benchmark.cc:
##########
@@ -24,42 +24,79 @@
 #include "arrow/testing/gtest_util.h"
 #include "arrow/testing/random.h"
 #include "arrow/util/key_value_metadata.h"
+#include "arrow/util/logging.h"
 
 namespace arrow {
 namespace compute {
 
 const int64_t kNumItems = 1024 * 1024;
 const int64_t kFewItems = 64 * 1024;
 
-template <typename Type, typename Enable = void>
-struct GetBytesProcessed {};
+struct GetBytesProcessedVisitor {
+  const Array* arr;
+  int64_t total_bytes = 0;
 
-template <>
-struct GetBytesProcessed<BooleanType> {
-  static int64_t Get(const std::shared_ptr<Array>& arr) { return arr->length() 
/ 8; }
-};
+  explicit GetBytesProcessedVisitor(const Array* arr) : arr(arr) {}
 
-template <typename Type>
-struct GetBytesProcessed<Type, enable_if_number<Type>> {
-  static int64_t Get(const std::shared_ptr<Array>& arr) {
+  Status RecurseInto(const Array* child_arr) {
+    // return VisitTypeInline(*child_arr->type(), this);

Review Comment:
   My bad. I commented this to reduce the template error noise when compiling 
and forgot to re-enable.



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