Skip to content

chore: Hide test-only internal public APIs - #25695

Merged
alamb merged 3 commits into
apache:mainfrom
2010YOUY01:hide-internal-public-apis
Oct 1, 2026
Merged

alamb merged 3 commits into
apache:mainfrom
2010YOUY01:hide-internal-public-apis

Conversation

@2010YOUY01

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

  • Closes #.

Rationale for this change

See the previous PR for ratioanle

This PR adds #[doc(hidden)] and comments for test-only public APIs

Note in the previous PR we've discussed using feature to hide them, but I tried and find it hard to maintain

What changes are included in this PR?

What is the testing strategy for this PR?

Are there any user-facing changes?

@github-actions github-actions Bot added documentation Improvements or additions to documentation logical-expr Logical plan and expressions physical-expr Changes to the physical-expr crates core Core DataFusion crate catalog Related to the catalog crate common Related to common crate functions Changes to functions implementation datasource Changes to the datasource crate physical-plan Changes to the physical-plan crate labels Sep 24, 2026
2. Operator APIs required by the optimizer to inspect or rewrite execution plans
across crate boundaries.

Do not expose internal APIs solely for tests or microbenchmarks. Some legacy code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be subjective, I think it's not a good idea to test or benchmark against implementation details overall. I'm not so sure if there are any special cases that require this pattern.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with this sentiment

@github-actions

github-actions Bot commented Sep 24, 2026 •

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 v55.1.0 (current)
       Built [  39.541s] (current)
     Parsing datafusion v55.1.0 (current)
      Parsed [   0.026s] (current)
    Building datafusion v55.1.0 (baseline)
       Built [  38.907s] (baseline)
     Parsing datafusion v55.1.0 (baseline)
      Parsed [   0.028s] (baseline)
    Checking datafusion v55.1.0 -> v55.1.0 (no change; assume patch)
     Checked [   0.454s] 223 checks: 221 pass, 2 fail, 0 warn, 31 skip

--- failure function_now_doc_hidden: pub function is now #[doc(hidden)] ---

Description:
A pub function is now #[doc(hidden)], removing it from the crate's public API.
        ref: https://doc.rust-lang.org/rustdoc/write-documentation/the-doc-attribute.html#hidden
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/function_now_doc_hidden.ron

Failed in:
  function table_with_sequence in file /home/runner/work/datafusion/datafusion/datafusion/core/src/test/mod.rs:221
  function aggr_test_schema in file /home/runner/work/datafusion/datafusion/datafusion/core/src/test_util/mod.rs:93
  function test_table in file /home/runner/work/datafusion/datafusion/datafusion/core/src/test_util/mod.rs:139
  function register_test_store in file /home/runner/work/datafusion/datafusion/datafusion/core/src/test/object_store.rs:42
  function local_unpartitioned_file in file /home/runner/work/datafusion/datafusion/datafusion/core/src/test/object_store.rs:66
  function test_table_with_cache_factory in file /home/runner/work/datafusion/datafusion/datafusion/core/src/test_util/mod.rs:372
  function create_table_dual in file /home/runner/work/datafusion/datafusion/datafusion/core/src/test/mod.rs:65
  function ensure_head_concurrency in file /home/runner/work/datafusion/datafusion/datafusion/core/src/test/object_store.rs:79
  function partitioned_file_groups in file /home/runner/work/datafusion/datafusion/datafusion/core/src/test/mod.rs:116
  function columns in file /home/runner/work/datafusion/datafusion/datafusion/core/src/test/mod.rs:215
  function bounded_stream in file /home/runner/work/datafusion/datafusion/datafusion/core/src/test_util/mod.rs:279
  function scan_empty_with_partitions in file /home/runner/work/datafusion/datafusion/datafusion/core/src/test_util/mod.rs:80
  function table_with_decimal in file /home/runner/work/datafusion/datafusion/datafusion/core/src/test/mod.rs:247
  function test_table_with_name in file /home/runner/work/datafusion/datafusion/datafusion/core/src/test_util/mod.rs:132
  function populate_csv_partitions in file /home/runner/work/datafusion/datafusion/datafusion/core/src/test_util/mod.rs:153
  function scan_partitioned_csv in file /home/runner/work/datafusion/datafusion/datafusion/core/src/test/mod.rs:83
  function assert_fields_eq in file /home/runner/work/datafusion/datafusion/datafusion/core/src/test/mod.rs:204
  function register_unbounded_file_with_ordering in file /home/runner/work/datafusion/datafusion/datafusion/core/src/test_util/mod.rs:262
  function make_partition in file /home/runner/work/datafusion/datafusion/datafusion/core/src/test/mod.rs:235
  function register_aggregate_csv in file /home/runner/work/datafusion/datafusion/datafusion/core/src/test_util/mod.rs:116
  function plan_and_collect in file /home/runner/work/datafusion/datafusion/datafusion/core/src/test_util/mod.rs:145
  function make_test_store_and_state in file /home/runner/work/datafusion/datafusion/datafusion/core/src/test/object_store.rs:48
  function scan_empty in file /home/runner/work/datafusion/datafusion/datafusion/core/src/test_util/mod.rs:68

--- failure struct_now_doc_hidden: pub struct is now #[doc(hidden)] ---

Description:
A pub struct is now #[doc(hidden)], removing it from the crate's public API.
        ref: https://doc.rust-lang.org/rustdoc/write-documentation/the-doc-attribute.html#hidden
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/struct_now_doc_hidden.ron

Failed in:
  struct TestCsvFile in file /home/runner/work/datafusion/datafusion/datafusion/core/src/test_util/csv.rs:30
  struct TestParquetFile in file /home/runner/work/datafusion/datafusion/datafusion/core/src/test_util/parquet.rs:49
  struct SystemVar in file /home/runner/work/datafusion/datafusion/datafusion/core/src/test/variable.rs:27
  struct UserDefinedVar in file /home/runner/work/datafusion/datafusion/datafusion/core/src/test/variable.rs:50
  struct ParquetScanOptions in file /home/runner/work/datafusion/datafusion/datafusion/core/src/test_util/parquet.rs:58
  struct TestTableFactory in file /home/runner/work/datafusion/datafusion/datafusion/core/src/test_util/mod.rs:183
  struct TestTableProvider in file /home/runner/work/datafusion/datafusion/datafusion/core/src/test_util/mod.rs:231

     Summary semver requires new major version: 2 major and 0 minor checks failed
    Finished [  80.697s] datafusion
    Building datafusion-catalog v55.1.0 (current)
       Built [  27.386s] (current)
     Parsing datafusion-catalog v55.1.0 (current)
      Parsed [   0.017s] (current)
    Building datafusion-catalog v55.1.0 (baseline)
       Built [  27.073s] (baseline)
     Parsing datafusion-catalog v55.1.0 (baseline)
      Parsed [   0.017s] (baseline)
    Checking datafusion-catalog v55.1.0 -> v55.1.0 (no change; assume patch)
     Checked [   0.086s] 223 checks: 222 pass, 1 fail, 0 warn, 31 skip

--- failure struct_pub_field_now_doc_hidden: pub struct field is now #[doc(hidden)] ---

Description:
A pub field of a pub struct is now marked #[doc(hidden)] and is no longer part of the public API.
        ref: https://doc.rust-lang.org/rustdoc/write-documentation/the-doc-attribute.html#hidden
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/struct_pub_field_now_doc_hidden.ron

Failed in:
  field MemTable.batches in file /home/runner/work/datafusion/datafusion/datafusion/catalog/src/memory/table.rs:72
  field MemTable.batches in file /home/runner/work/datafusion/datafusion/datafusion/catalog/src/memory/table.rs:72

     Summary semver requires new major version: 1 major and 0 minor checks failed
    Finished [  55.592s] datafusion-catalog
    Building datafusion-datasource v55.1.0 (current)
       Built [  29.528s] (current)
     Parsing datafusion-datasource v55.1.0 (current)
      Parsed [   0.022s] (current)
    Building datafusion-datasource v55.1.0 (baseline)
       Built [  28.737s] (baseline)
     Parsing datafusion-datasource v55.1.0 (baseline)
      Parsed [   0.024s] (baseline)
    Checking datafusion-datasource v55.1.0 -> v55.1.0 (no change; assume patch)
     Checked [   0.175s] 223 checks: 222 pass, 1 fail, 0 warn, 31 skip

--- failure function_now_doc_hidden: pub function is now #[doc(hidden)] ---

Description:
A pub function is now #[doc(hidden)], removing it from the crate's public API.
        ref: https://doc.rust-lang.org/rustdoc/write-documentation/the-doc-attribute.html#hidden
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/function_now_doc_hidden.ron

Failed in:
  function verify_sort_integrity in file /home/runner/work/datafusion/datafusion/datafusion/datasource/src/mod.rs:516
  function generate_test_files in file /home/runner/work/datafusion/datafusion/datafusion/datasource/src/mod.rs:458

     Summary semver requires new major version: 1 major and 0 minor checks failed
    Finished [  59.722s] datafusion-datasource
    Building datafusion-expr v55.1.0 (current)
       Built [  19.444s] (current)
     Parsing datafusion-expr v55.1.0 (current)
      Parsed [   0.059s] (current)
    Building datafusion-expr v55.1.0 (baseline)
       Built [  19.343s] (baseline)
     Parsing datafusion-expr v55.1.0 (baseline)
      Parsed [   0.059s] (baseline)
    Checking datafusion-expr v55.1.0 -> v55.1.0 (no change; assume patch)
     Checked [   0.855s] 223 checks: 221 pass, 2 fail, 0 warn, 31 skip

--- failure function_now_doc_hidden: pub function is now #[doc(hidden)] ---

Description:
A pub function is now #[doc(hidden)], removing it from the crate's public API.
        ref: https://doc.rust-lang.org/rustdoc/write-documentation/the-doc-attribute.html#hidden
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/function_now_doc_hidden.ron

Failed in:
  function max in file /home/runner/work/datafusion/datafusion/datafusion/expr/src/test/function_stub.rs:363
  function min in file /home/runner/work/datafusion/datafusion/datafusion/expr/src/test/function_stub.rs:285
  function count_udaf in file /home/runner/work/datafusion/datafusion/datafusion/expr/src/test/function_stub.rs:68
  function avg in file /home/runner/work/datafusion/datafusion/datafusion/expr/src/test/function_stub.rs:83
  function sum_udaf in file /home/runner/work/datafusion/datafusion/datafusion/expr/src/test/function_stub.rs:55
  function count in file /home/runner/work/datafusion/datafusion/datafusion/expr/src/test/function_stub.rs:70
  function max_udaf in file /home/runner/work/datafusion/datafusion/datafusion/expr/src/test/function_stub.rs:361
  function min_udaf in file /home/runner/work/datafusion/datafusion/datafusion/expr/src/test/function_stub.rs:283
  function sum in file /home/runner/work/datafusion/datafusion/datafusion/expr/src/test/function_stub.rs:57
  function avg_udaf in file /home/runner/work/datafusion/datafusion/datafusion/expr/src/test/function_stub.rs:81

--- failure struct_now_doc_hidden: pub struct is now #[doc(hidden)] ---

Description:
A pub struct is now #[doc(hidden)], removing it from the crate's public API.
        ref: https://doc.rust-lang.org/rustdoc/write-documentation/the-doc-attribute.html#hidden
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/struct_now_doc_hidden.ron

Failed in:
  struct Max in file /home/runner/work/datafusion/datafusion/datafusion/expr/src/test/function_stub.rs:376
  struct Avg in file /home/runner/work/datafusion/datafusion/datafusion/expr/src/test/function_stub.rs:441
  struct Count in file /home/runner/work/datafusion/datafusion/datafusion/expr/src/test/function_stub.rs:213
  struct Sum in file /home/runner/work/datafusion/datafusion/datafusion/expr/src/test/function_stub.rs:96
  struct Min in file /home/runner/work/datafusion/datafusion/datafusion/expr/src/test/function_stub.rs:298

     Summary semver requires new major version: 2 major and 0 minor checks failed
    Finished [  40.670s] datafusion-expr
    Building datafusion-functions-aggregate-common v55.1.0 (current)
       Built [  13.599s] (current)
     Parsing datafusion-functions-aggregate-common v55.1.0 (current)
      Parsed [   0.014s] (current)
    Building datafusion-functions-aggregate-common v55.1.0 (baseline)
       Built [  13.490s] (baseline)
     Parsing datafusion-functions-aggregate-common v55.1.0 (baseline)
      Parsed [   0.014s] (baseline)
    Checking datafusion-functions-aggregate-common v55.1.0 -> v55.1.0 (no change; assume patch)
     Checked [   0.099s] 223 checks: 222 pass, 1 fail, 0 warn, 31 skip

--- failure inherent_method_now_doc_hidden: inherent method #[doc(hidden)] added ---

Description:
A method or associated fn is now #[doc(hidden)], removing it from the crate's public API.
        ref: https://doc.rust-lang.org/rustdoc/write-documentation/the-doc-attribute.html#hidden
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/inherent_method_now_doc_hidden.ron

Failed in:
  TDigest::merge_unsorted_f64 in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/44a4dc9ebc7160293d16c1544e5d4aec03491d90/datafusion/functions-aggregate-common/src/tdigest.rs:210

     Summary semver requires new major version: 1 major and 0 minor checks failed
    Finished [  27.944s] datafusion-functions-aggregate-common
    Building datafusion-physical-expr v55.1.0 (current)
       Built [  19.313s] (current)
     Parsing datafusion-physical-expr v55.1.0 (current)
      Parsed [   0.034s] (current)
    Building datafusion-physical-expr v55.1.0 (baseline)
       Built [  19.008s] (baseline)
     Parsing datafusion-physical-expr v55.1.0 (baseline)
      Parsed [   0.036s] (baseline)
    Checking datafusion-physical-expr v55.1.0 -> v55.1.0 (no change; assume patch)
     Checked [   0.266s] 223 checks: 222 pass, 1 fail, 0 warn, 31 skip

--- failure function_now_doc_hidden: pub function is now #[doc(hidden)] ---

Description:
A pub function is now #[doc(hidden)], removing it from the crate's public API.
        ref: https://doc.rust-lang.org/rustdoc/write-documentation/the-doc-attribute.html#hidden
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/function_now_doc_hidden.ron

Failed in:
  function gen_conjunctive_numerical_expr in file /home/runner/work/datafusion/datafusion/datafusion/physical-expr/src/intervals/test_utils.rs:32
  function gen_conjunctive_temporal_expr in file /home/runner/work/datafusion/datafusion/datafusion/physical-expr/src/intervals/test_utils.rs:68

     Summary semver requires new major version: 1 major and 0 minor checks failed
    Finished [  39.736s] datafusion-physical-expr
    Building datafusion-physical-plan v55.1.0 (current)
       Built [  26.231s] (current)
     Parsing datafusion-physical-plan v55.1.0 (current)
      Parsed [   0.125s] (current)
    Building datafusion-physical-plan v55.1.0 (baseline)
       Built [  26.682s] (baseline)
     Parsing datafusion-physical-plan v55.1.0 (baseline)
      Parsed [   0.126s] (baseline)
    Checking datafusion-physical-plan v55.1.0 -> v55.1.0 (no change; assume patch)
     Checked [   0.457s] 223 checks: 219 pass, 4 fail, 0 warn, 31 skip

--- failure function_now_doc_hidden: pub function is now #[doc(hidden)] ---

Description:
A pub function is now #[doc(hidden)], removing it from the crate's public API.
        ref: https://doc.rust-lang.org/rustdoc/write-documentation/the-doc-attribute.html#hidden
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/function_now_doc_hidden.ron

Failed in:
  function aggr_test_schema in file /home/runner/work/datafusion/datafusion/datafusion/physical-plan/src/test.rs:382
  function scan_partitioned in file /home/runner/work/datafusion/datafusion/datafusion/physical-plan/src/test.rs:486
  function get_matched_indices_with_limit_offset in file /home/runner/work/datafusion/datafusion/datafusion/physical-plan/src/joins/join_hash_map.rs:389
  function assert_is_pending in file /home/runner/work/datafusion/datafusion/datafusion/physical-plan/src/test.rs:373
  function make_partition_utf8 in file /home/runner/work/datafusion/datafusion/datafusion/physical-plan/src/test.rs:470
  function get_matched_indices in file /home/runner/work/datafusion/datafusion/datafusion/physical-plan/src/joins/join_hash_map.rs:340
  function make_partition in file /home/runner/work/datafusion/datafusion/datafusion/physical-plan/src/test.rs:459
  function update_from_iter in file /home/runner/work/datafusion/datafusion/datafusion/physical-plan/src/joins/join_hash_map.rs:307
  function assert_strong_count_converges_to_zero in file /home/runner/work/datafusion/datafusion/datafusion/physical-plan/src/test/exec.rs:950
  function build_table_scan_i32 in file /home/runner/work/datafusion/datafusion/datafusion/physical-plan/src/test.rs:448
  function mem_exec_utf8 in file /home/runner/work/datafusion/datafusion/datafusion/physical-plan/src/test.rs:504
  function build_table_i32_two_cols in file /home/runner/work/datafusion/datafusion/datafusion/physical-plan/src/test.rs:428
  function mem_exec in file /home/runner/work/datafusion/datafusion/datafusion/physical-plan/src/test.rs:495
  function build_table_i32 in file /home/runner/work/datafusion/datafusion/datafusion/physical-plan/src/test.rs:405
  function scan_partitioned_utf8 in file /home/runner/work/datafusion/datafusion/datafusion/physical-plan/src/test.rs:490
  function contain_hashes in file /home/runner/work/datafusion/datafusion/datafusion/physical-plan/src/joins/join_hash_map.rs:486

--- failure struct_now_doc_hidden: pub struct is now #[doc(hidden)] ---

Description:
A pub struct is now #[doc(hidden)], removing it from the crate's public API.
        ref: https://doc.rust-lang.org/rustdoc/write-documentation/the-doc-attribute.html#hidden
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/struct_now_doc_hidden.ron

Failed in:
  struct BarrierExec in file /home/runner/work/datafusion/datafusion/datafusion/physical-plan/src/test/exec.rs:326
  struct StatisticsExec in file /home/runner/work/datafusion/datafusion/datafusion/physical-plan/src/test/exec.rs:655
  struct PanicExec in file /home/runner/work/datafusion/datafusion/datafusion/physical-plan/src/test/exec.rs:967
  struct JoinHashMapU64 in file /home/runner/work/datafusion/datafusion/datafusion/physical-plan/src/joins/join_hash_map.rs:224
  struct HashTableLookupExpr in file /home/runner/work/datafusion/datafusion/datafusion/physical-plan/src/joins/hash_join/partitioned_hash_eval.rs:278
  struct BlockingStream in file /home/runner/work/datafusion/datafusion/datafusion/physical-plan/src/test/exec.rs:922
  struct TestPartitionStream in file /home/runner/work/datafusion/datafusion/datafusion/physical-plan/src/test.rs:517
  struct MockExec in file /home/runner/work/datafusion/datafusion/datafusion/physical-plan/src/test/exec.rs:122
  struct ErrorExec in file /home/runner/work/datafusion/datafusion/datafusion/physical-plan/src/test/exec.rs:553
  struct BlockingExec in file /home/runner/work/datafusion/datafusion/datafusion/physical-plan/src/test/exec.rs:811
  struct TestMemoryExec in file /home/runner/work/datafusion/datafusion/datafusion/physical-plan/src/test.rs:65
  struct JoinHashMapU32 in file /home/runner/work/datafusion/datafusion/datafusion/physical-plan/src/joins/join_hash_map.rs:144
  struct TestStream in file /home/runner/work/datafusion/datafusion/datafusion/physical-plan/src/test/exec.rs:69
  struct BatchIndex in file /home/runner/work/datafusion/datafusion/datafusion/physical-plan/src/test/exec.rs:49

--- failure trait_newly_sealed: pub trait became sealed ---

Description:
A publicly-visible trait became sealed, so downstream crates are no longer able to implement it
        ref: https://rust-lang.github.io/api-guidelines/future-proofing.html#sealed-traits-protect-against-downstream-implementations-c-sealed
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/trait_newly_sealed.ron

Failed in:
  trait datafusion_physical_plan::joins::utils::JoinHashMapType in file /home/runner/work/datafusion/datafusion/datafusion/physical-plan/src/joins/join_hash_map.rs:105

--- failure trait_now_doc_hidden: pub trait is now #[doc(hidden)] ---

Description:
A pub trait is now #[doc(hidden)], removing it from the crate's public API.
        ref: https://doc.rust-lang.org/rustdoc/write-documentation/the-doc-attribute.html#hidden
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/trait_now_doc_hidden.ron

Failed in:
  trait JoinHashMapType in file /home/runner/work/datafusion/datafusion/datafusion/physical-plan/src/joins/join_hash_map.rs:105

     Summary semver requires new major version: 4 major and 0 minor checks failed
    Finished [  54.688s] datafusion-physical-plan

@github-actions github-actions Bot added the auto detected api change Auto detected API change label Sep 24, 2026
@codecov-commenter

codecov-commenter commented Sep 24, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.58%. Comparing base (1bd2ad3) to head (05fbfe8).
⚠️ Report is 52 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #25695      +/-   ##
==========================================
+ Coverage   82.51%   82.58%   +0.06%     
==========================================
  Files        1141     1145       +4     
  Lines      439774   443657    +3883     
  Branches   439774   443657    +3883     
==========================================
+ Hits       362896   366385    +3489     
- Misses      54939    55019      +80     
- Partials    21939    22253     +314     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@2010YOUY01
2010YOUY01 requested a review from alamb September 30, 2026 02:57

@alamb alamb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @2010YOUY01 -- other than the test_utils this looks good to me

/// [API policy]: https://datafusion.apache.org/contributor-guide/api-health.html#internal-public-apis
#[macro_export]
#[doc(hidden)]
macro_rules! assert_batches_eq {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we use assert_batches_eq in our tests quite a bit. These days it is probably better to use insta snapshots, but I am not sure claiming this particular API is (no longer) public is accurate

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sense to me, it's possible that downstream is relying on such test utilities

Reverted mod test_utils to public

Comment thread datafusion/common/src/test_util.rs Outdated
/// );
/// ```
///
/// # Public Only for Internal Use:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it was a public API, but we have now deprecated it 🤔

Comment thread datafusion/common/src/lib.rs Outdated
/// This is not a public API and is for internal use only; see [API policy] for details.
///
/// [API policy]: https://datafusion.apache.org/contributor-guide/api-health.html#internal-public-apis
#[doc(hidden)]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think some of the things in test_utils were actually public (see below) so not sure about this one

/// This is not a public API and is for internal use only; see [API policy] for details.
///
/// [API policy]: https://datafusion.apache.org/contributor-guide/api-health.html#internal-public-apis
#[doc(hidden)]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

2. Operator APIs required by the optimizer to inspect or rewrite execution plans
across crate boundaries.

Do not expose internal APIs solely for tests or microbenchmarks. Some legacy code

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@github-actions github-actions Bot removed the common Related to common crate label Oct 1, 2026
@alamb
alamb added this pull request to the merge queue Oct 1, 2026
@alamb

alamb commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Thanks @2010YOUY01

Merged via the queue into apache:main with commit 2b1fcae Oct 1, 2026
43 checks passed
Omega359 pushed a commit to Omega359/arrow-datafusion that referenced this pull request Oct 11, 2026
## Which issue does this PR close?

<!--
We generally require a GitHub issue to be filed for all bug fixes and
enhancements and this helps us generate change logs for our releases.
You can link an issue to this PR using the GitHub syntax. For example
`Closes apache#123` indicates that this PR will close issue apache#123.
-->

- Closes #.

## Rationale for this change

<!--
Why are you proposing this change? If this is already explained clearly
in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand
your changes and offer better suggestions for fixes.

Please explain the problem you are trying to solve in terms of the
user-visible
behavior, rather than the implementation.

For example, "The code in `foo.rs` doesn't handle nulls" is a symptom of
the
implementation. "COUNT(DISTINCT) returns wrong results when the column
contains
nulls" is the user-visible problem.
-->
See the previous PR for ratioanle
- apache#25495

This PR adds `#[doc(hidden)]` and comments for test-only public APIs

Note in the previous PR we've discussed using feature to hide them, but
I tried and find it hard to maintain
- apache#25678

## What changes are included in this PR?

<!--
There is no need to duplicate the description in the issue here, but it
is sometimes worth providing a summary of the individual changes in this
PR.
-->

## What is the testing strategy for this PR?

<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code

Briefly describe how this PR is tested, and point to the specific tests
you added. For example: 'This new feature is covered by the
`sqllogictest` cases added in `foo.slt`'.

If this PR does not add tests, explain why. For example, if the change
is already covered by existing tests, please mention it.

You should also check the `codecov` bot reply on this PR to confirm the
changed code is exercised.
-->

## Are there any user-facing changes?

<!--
If there are user-facing changes then we may require documentation to be
updated before approving the PR.

If there are any breaking changes to public APIs, please add the `api
change` label.
-->
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 catalog Related to the catalog crate core Core DataFusion crate datasource Changes to the datasource crate documentation Improvements or additions to documentation functions Changes to functions implementation logical-expr Logical plan and expressions physical-expr Changes to the physical-expr crates physical-plan Changes to the physical-plan crate v56.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants