diff --git a/cpp/src/arrow/tensor_benchmark.cc b/cpp/src/arrow/tensor_benchmark.cc index 67bd1a8c89901..8cace41d6004f 100644 --- a/cpp/src/arrow/tensor_benchmark.cc +++ b/cpp/src/arrow/tensor_benchmark.cc @@ -30,7 +30,8 @@ static void BatchToTensorSimple(benchmark::State& state) { using CType = typename ValueType::c_type; std::shared_ptr ty = TypeTraits::type_singleton(); - const int64_t kNumRows = state.range(0) / sizeof(CType); + const int64_t num_cols = state.range(1); + const int64_t num_rows = state.range(0) / num_cols / sizeof(CType); arrow::random::RandomArrayGenerator gen_{42}; std::vector> fields = {};