From d2ed61c30f984eec83a9cd02f1a7f89dab3f7645 Mon Sep 17 00:00:00 2001 From: Junming Chen Date: Thu, 19 Oct 2023 08:54:57 +0800 Subject: [PATCH] Update cpp/src/arrow/compute/kernels/aggregate_basic_internal.h Co-authored-by: Antoine Pitrou --- cpp/src/arrow/compute/kernels/aggregate_basic_internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/src/arrow/compute/kernels/aggregate_basic_internal.h b/cpp/src/arrow/compute/kernels/aggregate_basic_internal.h index 4268b44e98805..2285fad5877b7 100644 --- a/cpp/src/arrow/compute/kernels/aggregate_basic_internal.h +++ b/cpp/src/arrow/compute/kernels/aggregate_basic_internal.h @@ -921,8 +921,8 @@ struct DictionaryMinMaxImpl : public ScalarAggregator { out_type(std::move(out_type)), has_nulls(false), count(0), - min(nullptr), - max(nullptr) { + min(MakeNullScalar(this->out_type)), + max(this->min) { this->options.min_count = std::max(1, this->options.min_count); }