alamb commented on code in PR #10537: URL: https://github.com/apache/datafusion/pull/10537#discussion_r1607118413
########## datafusion/core/src/datasource/physical_plan/parquet/arrow_statistics.rs: ########## @@ -0,0 +1,43 @@ +use arrow_array::ArrayRef; +use arrow_schema::DataType; +use datafusion_common::Result; +use parquet::file::statistics::Statistics as ParquetStatistics; + +/// statistics extracted from `Statistics` as Arrow `ArrayRef`s +/// +/// # Note: +/// If the corresponding `Statistics` is not present, or has no information for +/// a column, a NULL is present in the corresponding array entry +pub struct ArrowStatistics { + /// min values + min: ArrayRef, + /// max values + max: ArrayRef, + /// Row counts (UInt64Array) + row_count: ArrayRef, + /// Null Counts (UInt64Array) + null_count: ArrayRef, +} + +/// Extract `ArrowStatistics` from the parquet [`Statistics`] +pub fn parquet_stats_to_arrow<'a>( + arrow_datatype: &DataType, + statistics: impl IntoIterator<Item = Option<&'a ParquetStatistics>>, +) -> Result<ArrowStatistics> { + todo!() // MY TODO next +} Review Comment: Filed https://github.com/apache/datafusion/issues/10586 -- 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...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org