WillAyd commented on code in PR #15041:
URL: https://github.com/apache/arrow/pull/15041#discussion_r1052902450


##########
cpp/src/arrow/compute/kernels/vector_sort_benchmark.cc:
##########
@@ -95,6 +95,25 @@ static void 
ChunkedArraySortFuncInt64Benchmark(benchmark::State& state,
   ArraySortFuncBenchmark(state, runner, 
std::make_shared<ChunkedArray>(chunks));
 }
 
+template <typename Runner>
+static void ChunkedArraySortFuncStringBenchmark(benchmark::State& state,
+                                                const Runner& runner, int64_t 
min_length,
+                                                int64_t max_length) {
+  RegressionArgs args(state);
+
+  const int64_t n_chunks = 10;
+  const int64_t array_size = args.size / n_chunks / sizeof(int64_t);
+  auto rand = random::RandomArrayGenerator(kSeed);
+
+  ArrayVector chunks;
+  for (int64_t i = 0; i < n_chunks; ++i) {
+    chunks.push_back(std::static_pointer_cast<StringArray>(
+        rand.String(array_size, min_length, max_length, 
args.null_proportion)));

Review Comment:
   Doesn't appear so. I  originally copied the cast from 
https://github.com/apache/arrow/blob/4e9b65a4a33f57005472eaf9f2654ae61ff83101/cpp/src/arrow/compute/kernels/vector_selection_benchmark.cc#L133
 where it also seems unnecessary - want me to remove there as well?



-- 
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-unsubscr...@arrow.apache.org

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

Reply via email to