alamb commented on issue #8078:
URL: https://github.com/apache/datafusion/issues/8078#issuecomment-3276058762

   >  Doing this requires a re-design of the Statistics struct and handling all 
of the breaking changes.
   
   Yes I think that is the biggest challenge
   
   What makes it hard is that 
https://docs.rs/datafusion/latest/datafusion/common/struct.Statistics.html
   
   has a bunch of public fields
   
   ```rust
   pub struct Statistics {
       pub num_rows: Precision<usize>,
       pub total_byte_size: Precision<usize>,
       pub column_statistics: Vec<ColumnStatistics>,
   }
   ```
   
   I think we can probably prepare for / take most of the API pain at first by 
changing this so the fields are not pub
   ```
   pub struct Statistics {
       num_rows: Precision<usize>,
       total_byte_size: Precision<usize>,
       column_statistics: Vec<ColumnStatistics>,
   }
   ```
   
   And then adding appropriate APIs to construct / check statistics
   
   Like
   
   ```rust
   let statistics = Statistics::builder((
     .with_num_rows(Precision::Exact(20))
     .build();
   ```
   
   


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