diff --git a/parquet/src/file/page_index/index.rs b/parquet/src/file/page_index/index.rs index b990444c7928..0c23e4aa38b8 100644 --- a/parquet/src/file/page_index/index.rs +++ b/parquet/src/file/page_index/index.rs @@ -247,14 +247,29 @@ impl NativeIndex { .map(|x| x.null_count()) .collect::>>(); + // Concatenate page histograms into a single Option + let repetition_level_histograms = self + .indexes + .iter() + .map(|x| x.repetition_level_histogram().map(|v| v.values())) + .collect::>>() + .map(|hists| hists.concat()); + + let definition_level_histograms = self + .indexes + .iter() + .map(|x| x.definition_level_histogram().map(|v| v.values())) + .collect::>>() + .map(|hists| hists.concat()); + ColumnIndex::new( self.indexes.iter().map(|x| x.min().is_none()).collect(), min_values, max_values, self.boundary_order, null_counts, - None, - None, + repetition_level_histograms, + definition_level_histograms, ) } }