alamb opened a new pull request, #26423:
URL: https://github.com/apache/datafusion/pull/26423

   ## Which issue does this PR close?
   
   N/A
   
   ## Rationale for this change
   
   Each `.rs` file directly in a `tests` directory becomes its own test binary, 
which means extra binary size, extra link time, and tests that cannot run in 
parallel with tests in other binaries. This follows the same rationale as 
earlier consolidations (#10588, #11831, #18226) and my recent #26419 and #26422.
   
   `datafusion-ffi` currently builds 10 separate integration test binaries, 
most of them 300-400 MB in a normal debug build, for a total of about **2.66 
GB** (2,664,138,160 bytes) on my machine (macOS, aarch64).
   
   ## What changes are included in this PR?
   
   Combine the 10 `datafusion/ffi/tests/ffi_*.rs` files into the single 
existing `ffi_integration` test binary:
   
   - `tests/ffi_integration.rs` is now the entry point; it declares `mod 
utils;` and `mod cases;` (the latter gated on the `integration-tests` feature, 
as the tests were before).
   - Each former binary is now a module under `tests/cases/` (`catalog`, 
`config`, `execution_plan`, `physical_optimizer`, `query_planner`, 
`table_provider` (the previous contents of `ffi_integration.rs`), `udaf`, 
`udf`, `udtf`, `udwf`).
   - The per-file `mod tests { ... }` wrappers and `mod utils;` declarations 
are removed (the `integration-tests` gate moved to `mod cases`), and 
`super::utils` became `crate::utils`. Test bodies are otherwise unchanged.
   
   Debug binary sizes (`cargo test -p datafusion-ffi --features 
integration-tests --tests --no-run`):
   
   | binary | bytes |
   |---|---|
   | `ffi_catalog` | 382,295,824 |
   | `ffi_config` | 6,295,496 |
   | `ffi_execution_plan` | 71,841,312 |
   | `ffi_integration` | 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,520,896** |
   
   This reduces the test binaries for this crate from about 2.66 GB to about 
409 MB (~85% smaller), and from 10 link steps to 1.
   
   ## What is the testing strategy for this PR?
   
   The same 32 tests (32 before, 32 after) now run in one binary:
   
   ```shell
   cargo test -p datafusion-ffi --features integration-tests --test 
ffi_integration
   ```
   
   All pass. `cargo fmt` and `cargo clippy --all-targets -D warnings` (with 
`integration-tests`) pass.
   
   ## Are there any user-facing changes?
   
   No, developer productivity only.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to