berkaysynnada commented on code in PR #7793:
URL: https://github.com/apache/arrow-datafusion/pull/7793#discussion_r1359590288


##########
datafusion/common/src/stats.rs:
##########
@@ -203,70 +204,94 @@ impl<T: fmt::Debug + Clone + PartialEq + Eq + PartialOrd> 
Display for Precision<
 /// Fields are optional and can be inexact because the sources
 /// sometimes provide approximate estimates for performance reasons
 /// and the transformations output are not always predictable.
-#[derive(Debug, Clone, Default, PartialEq, Eq)]
+#[derive(Debug, Clone, PartialEq, Eq)]
 pub struct Statistics {
     /// The number of table rows
-    pub num_rows: Option<usize>,
+    pub num_rows: Precision<usize>,
     /// total bytes of the table rows
-    pub total_byte_size: Option<usize>,
+    pub total_byte_size: Precision<usize>,
     /// Statistics on a column level
-    pub column_statistics: Option<Vec<ColumnStatistics>>,
-    /// If true, any field that is `Some(..)` is the actual value in the data 
provided by the operator (it is not
-    /// an estimate). Any or all other fields might still be None, in which 
case no information is known.
-    /// if false, any field that is `Some(..)` may contain an inexact estimate 
and may not be the actual value.
-    pub is_exact: bool,
+    pub column_statistics: Vec<ColumnStatistics>,

Review Comment:
   You're right, I add it now. We can even make the fields private and restrict 
the initialization of Statistics such that it can only be constructed with a 
schema if you prefer a safer way.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to