From ab9dd4eb0b7cd89f9593d50a2b121342e8948984 Mon Sep 17 00:00:00 2001 From: Dodothereal <129273127+Dodothereal@users.noreply.github.com> Date: Tue, 23 Jun 2026 20:30:07 +0200 Subject: [PATCH] chore(datasource): remove deprecated `add_row_stats` free function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `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). --- datafusion/datasource/src/mod.rs | 3 --- datafusion/datasource/src/statistics.rs | 8 -------- 2 files changed, 11 deletions(-) diff --git a/datafusion/datasource/src/mod.rs b/datafusion/datasource/src/mod.rs index d4dfa1180ecf2..41ed948c74c6f 100644 --- a/datafusion/datasource/src/mod.rs +++ b/datafusion/datasource/src/mod.rs @@ -63,10 +63,7 @@ use datafusion_physical_expr::LexOrdering; use futures::Stream; use object_store::{ObjectMeta, path::Path}; pub use table_schema::{TableSchema, TableSchemaBuilder}; -// Remove when add_row_stats is remove use arrow::datatypes::SchemaRef; -#[expect(deprecated)] -pub use statistics::add_row_stats; pub use statistics::compute_all_files_statistics; use std::any::Any; use std::pin::Pin; diff --git a/datafusion/datasource/src/statistics.rs b/datafusion/datasource/src/statistics.rs index 6abfafe9d39d4..781cf3dbced94 100644 --- a/datafusion/datasource/src/statistics.rs +++ b/datafusion/datasource/src/statistics.rs @@ -541,14 +541,6 @@ pub fn compute_all_files_statistics( Ok((file_groups_with_stats, statistics)) } -#[deprecated(since = "47.0.0", note = "Use Statistics::add")] -pub fn add_row_stats( - file_num_rows: Precision, - num_rows: Precision, -) -> Precision { - file_num_rows.add(&num_rows) -} - #[cfg(test)] mod tests { use super::*;