You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/12/16 20:51:46 UTC

[GitHub] [arrow] Dandandan commented on a change in pull request #8944: ARROW-10783: [Rust][DataFusion] Implement Statistics for Parquet TableProvider

Dandandan commented on a change in pull request #8944:
URL: https://github.com/apache/arrow/pull/8944#discussion_r544614359



##########
File path: rust/datafusion/src/datasource/parquet.rs
##########
@@ -41,10 +41,25 @@ impl ParquetTable {
     pub fn try_new(path: &str) -> Result<Self> {
         let parquet_exec = ParquetExec::try_new(path, None, 0)?;
         let schema = parquet_exec.schema();
+
+        let metadata = parquet_exec.metadata();
+        let (num_rows, total_byte_size) = metadata.row_groups().iter().fold(

Review comment:
       I think this would be better as two "loops", than it can use `.sum()` as well instead of fold?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org