Skip to content

chore(datasource): remove deprecated add_row_stats (Closes #23080 - partial)#23134

Open
Dodothereal wants to merge 1 commit into
apache:mainfrom
Dodothereal:chore/remove-deprecated-add-row-stats
Open

chore(datasource): remove deprecated add_row_stats (Closes #23080 - partial)#23134
Dodothereal wants to merge 1 commit into
apache:mainfrom
Dodothereal:chore/remove-deprecated-add-row-stats

Conversation

@Dodothereal

Copy link
Copy Markdown
Contributor

Removes datafusion_datasource::add_row_stats (deprecated since 47.0.0 with replacement Statistics::add). Zero callers — the only references are the deprecated function definition and a single pub use re-export (carrying an explicit 'Remove when add_row_stats is remove' comment, indicating this was already acknowledged as future work). Pure 11-line deletion across 2 files. Closes #23080 (partial - fourth in housekeeping series after #23129, #23131, #23132). AI assistance: used an AI coding assistant; verified via repo-wide grep that the function has no callers.

`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 apache#23080 (partial — first in this batch to come from the 47.0.0-deprecated set).
@Dodothereal

Copy link
Copy Markdown
Contributor Author

Re-pinging: this PR is a 7-line removal of add_row_stats() in ListingOptions (deprecated since 1bc7aaa; follow-up to #22983 and closes part of #23080). cargo-semver-checks workflow may need re-running — happy to re-push if needed. (Continuation of the started sweep #23129 / #23131 / #23132 which landed.)

@Dodothereal

Copy link
Copy Markdown
Contributor Author

@alamb (and any other reviewer) — gentle ping: this is the 4th removal in the #23080 sweep; the first three (#23129, #23131, #23132) all landed today. Branch is up to date with upstream/main; commit 8b8e5f8 is ready for review. cargo-semver-checks should not need to bump since this is the only public-function removal in the datasource module on the branch. If you'd like me to rebase onto a recent main commit, let me know.

@Dodothereal

Copy link
Copy Markdown
Contributor Author

Friendly nudge — this is a zero-caller pure-removal that unblocks another cleanup in #23080 series. Ready when a maintainer can approve CI / merge. (Same for #23135 right behind it.)

@alamb

alamb commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Friendly nudge — this is a zero-caller pure-removal that unblocks another cleanup in #23080 series. Ready when a maintainer can approve CI / merge. (Same for #23135 right behind it.)

thanks @Dodothereal -- we are working on it -- just never enough reviewer bandwidth unfortunately

@alamb alamb enabled auto-merge June 24, 2026 20:49
@github-actions

Copy link
Copy Markdown

Thank you for opening this pull request!

Reviewer note: cargo-semver-checks reported the current version number is not SemVer-compatible with the changes in this pull request (compared against the base branch).

Details
     Cloning apache/main
    Building datafusion-datasource v54.0.0 (current)
       Built [  37.460s] (current)
     Parsing datafusion-datasource v54.0.0 (current)
      Parsed [   0.033s] (current)
    Building datafusion-datasource v54.0.0 (baseline)
       Built [  36.218s] (baseline)
     Parsing datafusion-datasource v54.0.0 (baseline)
      Parsed [   0.035s] (baseline)
    Checking datafusion-datasource v54.0.0 -> v54.0.0 (no change; assume patch)
     Checked [   0.386s] 223 checks: 220 pass, 3 fail, 0 warn, 30 skip

--- failure function_missing: pub fn removed or renamed ---

Description:
A publicly-visible function cannot be imported by its prior path. A `pub use` may have been removed, or the function itself may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/function_missing.ron

Failed in:
  function datafusion_datasource::add_row_stats, previously in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/668f342273aa5c7408eced53df4a09f150f4afad/datafusion/datasource/src/statistics.rs:545

--- failure inherent_method_missing: pub method removed or renamed ---

Description:
A publicly-visible method or associated fn is no longer available under its prior name. It may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/inherent_method_missing.ron

Failed in:
  FileScanConfigBuilder::with_output_partitioning, previously in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/668f342273aa5c7408eced53df4a09f150f4afad/datafusion/datasource/src/file_scan_config/mod.rs:479

--- failure struct_pub_field_missing: pub struct's pub field removed or renamed ---

Description:
A publicly-visible struct has at least one public field that is no longer available under its prior name. It may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/struct_pub_field_missing.ron

Failed in:
  field output_partitioning of struct FileScanConfig, previously in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/668f342273aa5c7408eced53df4a09f150f4afad/datafusion/datasource/src/file_scan_config/mod.rs:218

     Summary semver requires new major version: 3 major and 0 minor checks failed
    Finished [  75.525s] datafusion-datasource

@github-actions github-actions Bot added the auto detected api change Auto detected API change label Jun 24, 2026
alamb pushed a commit to pantShrey/datafusion that referenced this pull request Jun 24, 2026
…loses apache#23080 - partial) (apache#23135)

Removes Signature::get_possible_types (deprecated since 46.0.0 with
replacement get_example_types). Pure 5-line deletion; the in-tree unit
test already calls get_example_types directly, so no test updates
needed. Closes apache#23080 (partial - fifth in housekeeping series after
apache#23129, apache#23131, apache#23132, apache#23134). AI assistance: used an AI coding
assistant; verified via repo-wide grep that the function is unused
outside tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto detected api change Auto detected API change datasource Changes to the datasource crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove old deprecated code

2 participants