kou commented on issue #47101: URL: https://github.com/apache/arrow/issues/47101#issuecomment-3111699602
I see. The following may work too: ```diff diff --git a/cpp/src/arrow/record_batch.cc b/cpp/src/arrow/record_batch.cc index 04d6890d39..42fd375b0f 100644 --- a/cpp/src/arrow/record_batch.cc +++ b/cpp/src/arrow/record_batch.cc @@ -525,7 +525,9 @@ Status EnumerateStatistics(const RecordBatch& record_batch, OnStatistics on_stat statistics.nth_statistics++; statistics.key = ARROW_STATISTICS_KEY_DISTINCT_COUNT_EXACT; statistics.type = int64(); - statistics.value = column_statistics->distinct_count.value(); + std::visit([&statistics](auto value) { + statistics.value = value; + }, column_statistics->distinct_count.value()); RETURN_NOT_OK(on_statistics(statistics)); statistics.start_new_column = false; } ``` -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org