xudong963 commented on PR #15289:
URL: https://github.com/apache/datafusion/pull/15289#issuecomment-2732041851

   > Instead of either "try for all" or "skip at all", isn't better to only go 
over the columns which has statistics.is_some() ?
   
   Do you mean the following?
   ```rust
   // Instead of a single boolean flag
   let columns_with_statistics: Vec<_> = row_group_meta.columns().iter()
       .enumerate()
       .filter_map(|(idx, column)| {
           if column.statistics().is_some() {
               Some(idx)
           } else {
               None
           }
       })
       .collect();
   
   // Then later, when processing column statistics
   for (col_idx, field) in table_schema.fields().iter().enumerate() {
       if columns_with_statistics.contains(&col_idx) {
           // Process only columns that have statistics
           // Use the statistics converter and update min/max accumulators
       } 
   }
   ```


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

Reply via email to