emkornfield commented on a change in pull request #10729: URL: https://github.com/apache/arrow/pull/10729#discussion_r671368919
########## File path: cpp/src/parquet/statistics.cc ########## @@ -567,6 +568,27 @@ class TypedStatisticsImpl : public TypedStatistics<DType> { SetMinMaxPair(comparator_->GetMinMax(values)); } + void UpdateArrowDictionary(const ::arrow::Array& indices, + const ::arrow::Array& dictionary) { + IncrementNullCount(indices.null_count()); + IncrementNumValues(indices.length() - indices.null_count()); + + if (indices.null_count() == indices.length()) { + return; + } + + ::arrow::compute::ExecContext ctx(pool_); + PARQUET_ASSIGN_OR_THROW(auto referenced_indices, + ::arrow::compute::Unique(indices, &ctx)); + PARQUET_ASSIGN_OR_THROW( Review comment: If we have MinMax and it works for dictionary arrays that sounds like a good idea to me. -- 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