Skip to content

minor: combine datafusion-ffi test binaries into ffi_integration - #26423

Merged
alamb merged 1 commit into
apache:mainfrom
alamb:fold-ffi-test-binaries
Oct 21, 2026
Merged

alamb merged 1 commit into
apache:mainfrom
alamb:fold-ffi-test-binaries

Conversation

@alamb

@alamb alamb commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

This follows the same rationale as earlier PRs like

Rationale for this change

Each .rs file directly in datafusion/ffi/tests becomes its own test binary. In this case, the 10 standalone ffi_* binaries require about 2.48 GB (2,664,138,160 bytes) in total on my machine (macOS, aarch64)

cargo test -p datafusion-ffi --features integration-tests --tests --no-run

The binaries were added in

What changes are included in this PR?

Combine the 10 datafusion/ffi/tests/ffi_*.rs files into the single ffi_integration test binary:

Size of the binaries (debug build):

binary bytes
ffi_catalog 382,295,824
ffi_config 6,295,496
ffi_execution_plan 71,841,312
ffi_integration (before) 382,373,904
ffi_physical_optimizer 71,361,096
ffi_query_planner 382,445,168
ffi_udaf 320,780,232
ffi_udf 319,111,528
ffi_udtf 407,588,120
ffi_udwf 320,045,480
total before (10 binaries) 2,664,138,160
ffi_integration after (1 binary) 408,453,600

So this goes from about 2.48 GB to about 390 MB (408,453,600 bytes) (~85% smaller) and from 10 link steps to 1.

What is the testing strategy for this PR?

CI. The same 32 tests run before and after:

cargo test -p datafusion-ffi --features integration-tests --test ffi_integration

Are there any user-facing changes?

No, developer productivity / CI efficiency

@github-actions github-actions Bot added the ffi Changes to the ffi crate label Oct 16, 2026
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@alamb
alamb force-pushed the fold-ffi-test-binaries branch from 5d9a043 to 9d40536 Compare October 16, 2026 17:32
/// Add an additional module here for convenience to scope this to only
/// when the feature integration-tests is built
#[cfg(feature = "integration-tests")]
mod tests {

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.

we can remove this extra level of indent as a follow on PR, but I wanted to keep the diff down for this one

@alamb
alamb marked this pull request as ready for review October 16, 2026 17:33
@alamb alamb added the development-process Related to development process of DataFusion label Oct 16, 2026
@alamb alamb changed the title test: combine datafusion-ffi test binaries into ffi_integration minor: combine datafusion-ffi test binaries into ffi_integration Oct 16, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.88%. Comparing base (1da3cf0) to head (9d40536).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #26423      +/-   ##
==========================================
- Coverage   82.89%   82.88%   -0.01%     
==========================================
  Files        1153     1153              
  Lines      457487   457487              
  Branches   457487   457487              
==========================================
- Hits       379213   379202      -11     
- Misses      55264    55272       +8     
- Partials    23010    23013       +3     

☔ 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.

@alamb
alamb requested a review from timsaucer October 18, 2026 11:36

@nuno-faria nuno-faria 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.

LGTM, almost 1GB saved on my end! Thanks @alamb.

# before
143M    datafusion_ffi
132M    ffi_catalog
4.3M    ffi_config
28M     ffi_execution_plan
132M    ffi_integration
28M     ffi_physical_optimizer
132M    ffi_query_planner
108M    ffi_udaf
108M    ffi_udf
142M    ffi_udtf
108M    ffi_udwf
1.1G    total

# now
143M    datafusion_ffi
142M    ffi_integration
284M    total

@alamb

alamb commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

Thank you for the review @nuno-faria -- I am hoping every little bit helps

@alamb
alamb added this pull request to the merge queue Oct 20, 2026
Merged via the queue into apache:main with commit 894c2d3 Oct 21, 2026
43 of 46 checks passed
@alamb
alamb deleted the fold-ffi-test-binaries branch October 21, 2026 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

development-process Related to development process of DataFusion ffi Changes to the ffi crate v56.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants