rok commented on PR #12997:
URL: https://github.com/apache/arrow/pull/12997#issuecomment-1111200446
I wanted to add `AssumeTimezone` kernel benchmark like:
```
static void BenchmarkISOCalendar(benchmark::State& state) {
RegressionArgs args(state);
ExecContext* ctx = default_exec_context();
const int64_t array_size = args.size / sizeof(int64_t);
auto rand = random::RandomArrayGenerator(kSeed);
auto array =
rand.Numeric<Int64Type>(array_size, kInt64Min, kInt64Max,
args.null_proportion);
EXPECT_OK_AND_ASSIGN(auto timestamp_array,
array->View(timestamp(TimeUnit::NANO)));
for (auto _ : state) {
ABORT_NOT_OK(ISOCalendar(timestamp_array, ctx).status());
}
state.SetItemsProcessed(state.iterations() * array_size);
}
BENCHMARK(BenchmarkISOCalendar)->Apply(SetArgs);
```
And got:
```
arrow-compute-scalar-temporal-benchmark(74236,0x1049e0580) malloc: Incorrect
checksum for freed object 0x105204740: probably modified after being freed.
Corrupt value: 0x3
arrow-compute-scalar-temporal-benchmark(74236,0x1049e0580) malloc: *** set a
breakpoint in malloc_error_break to debug
```
Which I assume is due to `ISOCalendar` output being a struct array. Any
ideas how to get around it? It's not a big issue but would be nice to cover.
--
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]