Skip to content

Commit

Permalink
Set start_new_column = false after yielding a table level statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Oct 31, 2024
1 parent cc41a0f commit 9c529d1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cpp/src/arrow/record_batch.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 9c529d1

Please sign in to comment.