rok commented on code in PR #13302:
URL: https://github.com/apache/arrow/pull/13302#discussion_r892603134


##########
cpp/src/arrow/compute/kernels/scalar_temporal_benchmark.cc:
##########
@@ -172,6 +194,10 @@ auto non_zoned = timestamp(TimeUnit::NANO);
 #define DECLARE_TEMPORAL_BENCHMARKS_ZONED(OP) \
   BENCHMARK_TEMPLATE(BenchmarkTemporal, OP, zoned)->Apply(SetArgs);
 
+#define DECLARE_TEMPORAL_BINARY_BENCHMARKS(OP)                                \
+  BENCHMARK_TEMPLATE(BenchmarkTemporalBinary, OP, non_zoned)->Apply(SetArgs); \
+  BENCHMARK_TEMPLATE(BenchmarkTemporalBinary, OP, zoned)->Apply(SetArgs);

Review Comment:
   I assume you're referring to this part?
   ```
   auto array = rand.Numeric<Int64Type>(array_size, kInt64Min, kInt64Max, 
args.null_proportion);
   std::shared_ptr<DataType> timestamp_type = timestamp(TimeUnit::NANO, 
"Pacific/Marquesas");
   EXPECT_OK_AND_ASSIGN(auto timestamp_array, array->View(timestamp_type));
   ```
   So `int64_t` here represents an integer array. Before throwing it into the 
kernel we interpret it as a timestamp array which does not change the 
underlaying buffer. I believe 32 types use `Int32Type` and 64 use `Int64Type`. 
Perhaps you can just use 
[`RandomArrayGenerator`](https://github.com/apache/arrow/blob/master/cpp/src/arrow/testing/random.h)
 to generate needed arrays.



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