asolimando commented on code in PR #23670:
URL: https://github.com/apache/datafusion/pull/23670#discussion_r3659234722
##########
datafusion/datasource/src/file_scan_config/mod.rs:
##########
@@ -2480,6 +2483,46 @@ mod tests {
assert_eq!(partition_stats.total_byte_size, Precision::Exact(800));
}
+ #[test]
+ fn test_statistics_with_filter() {
+ assert_num_rows_with_filter(Precision::Absent, Precision::Absent);
+ assert_num_rows_with_filter(Precision::Exact(100),
Precision::Inexact(100));
+ assert_num_rows_with_filter(Precision::Inexact(100),
Precision::Inexact(100));
+ assert_num_rows_with_filter(Precision::Exact(0), Precision::Exact(0));
+
+ /// Creates a [`FileScanConfig`] with a filter and calls
[`FileScanConfig::statistics`].
+ /// Then the function checks the output num_rows stats, given the
input num_rows stats.
+ fn assert_num_rows_with_filter(
+ input_num_rows: Precision<usize>,
+ expected_num_rows: Precision<usize>,
+ ) {
+ // Create a schema with 4 columns
Review Comment:
Nit: maybe can we drop this comment as it's not very informative?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]