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


##########
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:
   Is this pointer cast necessary?



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