EpsilonPrime commented on code in PR #30309:
URL: https://github.com/apache/arrow/pull/30309#discussion_r1067754952
##########
cpp/src/arrow/compute/kernels/scalar_round_benchmark.cc:
##########
@@ -45,6 +45,7 @@ static void RoundArrayBenchmark(benchmark::State& state,
const std::string& func
rand.Numeric<ArrowType>(array_size, min, max, args.null_proportion));
RoundOptions options;
options.round_mode = static_cast<RoundMode>(Mode);
+ options.ndigits = 1; // Round to the appropriate tenth.
Review Comment:
For floating point types, yes. For integer types, `ndigits=0` should be
optimized away. I suppose I could set it up to run 0/1 for floating point and
just 1 for integer types. Not that it makes a difference here but the two arg
version of round (the version that will be exposed to Substrait) is going to be
using random values from -6 to +6.
--
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]