Skip to content

Commit ab9dd4e

Browse files
committed
chore(datasource): remove deprecated add_row_stats free function
`datafusion_datasource::add_row_stats` was deprecated in DataFusion 47.0.0 with the suggestion to use `Statistics::add`. Per the API health deprecation guidelines, APIs deprecated in 47.0.0 are eligible for removal now that datafusion is on 55.x. A repo-wide grep confirms zero callers of `add_row_stats` — the only non-test references are the deprecated function definition itself and a single `pub use statistics::add_row_stats;` re-export line in `datafusion/datasource/src/mod.rs` (with a comment explicitly noting 'Remove when add_row_stats is remove'). This commit removes both the function and the now-unneeded re-export/comment. Closes #23080 (partial — first in this batch to come from the 47.0.0-deprecated set).
1 parent 5d24591 commit ab9dd4e

2 files changed

Lines changed: 0 additions & 11 deletions

File tree

‎datafusion/datasource/src/mod.rs‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,7 @@ use datafusion_physical_expr::LexOrdering;
6363
use futures::Stream;
6464
use object_store::{ObjectMeta, path::Path};
6565
pub use table_schema::{TableSchema, TableSchemaBuilder};
66-
// Remove when add_row_stats is remove
6766
use arrow::datatypes::SchemaRef;
68-
#[expect(deprecated)]
69-
pub use statistics::add_row_stats;
7067
pub use statistics::compute_all_files_statistics;
7168
use std::any::Any;
7269
use std::pin::Pin;

‎datafusion/datasource/src/statistics.rs‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -541,14 +541,6 @@ pub fn compute_all_files_statistics(
541541
Ok((file_groups_with_stats, statistics))
542542
}
543543

544-
#[deprecated(since = "47.0.0", note = "Use Statistics::add")]
545-
pub fn add_row_stats(
546-
file_num_rows: Precision<usize>,
547-
num_rows: Precision<usize>,
548-
) -> Precision<usize> {
549-
file_num_rows.add(&num_rows)
550-
}
551-
552544
#[cfg(test)]
553545
mod tests {
554546
use super::*;

0 commit comments

Comments
 (0)