From 9c529d1ae00da85a5dc6616e8d9cbd6dc4d59564 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Wed, 30 Oct 2024 16:17:06 +0900 Subject: [PATCH] Set start_new_column = false after yielding a table level statistics --- cpp/src/arrow/record_batch.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpp/src/arrow/record_batch.cc b/cpp/src/arrow/record_batch.cc index 0f4c7d4e44b10..3f8237188dc75 100644 --- a/cpp/src/arrow/record_batch.cc +++ b/cpp/src/arrow/record_batch.cc @@ -486,10 +486,12 @@ Status EnumerateStatistics(const RecordBatch& record_batch, OnStatistics on_stat statistics.nth_statistics = 0; statistics.start_new_column = true; statistics.nth_column = std::nullopt; + statistics.key = ARROW_STATISTICS_KEY_ROW_COUNT_EXACT; statistics.type = int64(); statistics.value = record_batch.num_rows(); RETURN_NOT_OK(on_statistics(statistics)); + statistics.start_new_column = false; const auto num_fields = record_batch.schema()->num_fields(); for (int nth_column = 0; nth_column < num_fields; ++nth_column) {