villebro opened a new pull request, #2791:
URL: https://github.com/apache/datafusion-ballista/pull/2791

   # Which issue does this PR close?
   
   Not related to an issue. It follows the review of #2765, where 
`write_tables`, `state()`,
   `register_tables()` and `rows()` turned out to be copied into the new
   `ballista/client/tests/reuse_exchange.rs` from `pipelined.rs` and 
`standalone_push_staged.rs`.
   
   # Rationale for this change
   
   The client integration tests had no shared home for their fixtures, so each 
new test copied the
   nearest one. `write_tables` was byte-identical in three files, the session 
state builder and the
   result formatting were repeated in four, and the `alltypes_plain.parquet` 
registration and its
   expected outputs were written out about twenty times in `context_checks.rs` 
and
   `context_setup.rs`.
   
   This PR only moves fixtures into `tests/common`. It does not add, remove or 
merge any test.
   
   # What changes are included in this PR?
   
   - `tests/common/mod.rs` gains the shared fixtures: the orders/customers 
tables
     (`write_orders_customers`, `register_orders_customers`, 
`orders_customers_dir`,
     `orders_customers_context`, `ORDERS_QUERIES`), `ballista_state`, 
`state_with_config`,
     `datafusion_context`, `register_csv_tables`, `register_alltypes`, 
`write_parquet_file`,
     `set_option`, `collect_text`, `collect_lines`, `check_matches`, 
`assert_result_eq`, and the
     expected outputs of the `alltypes_plain` queries.
   - `tests/common` resolves the crate's `testdata` directory directly. The 
45-line `get_data_dir`
     copy (with an `EXAMPLES_TEST_DATA` override that nothing sets) and three 
copies of the rstest
     `test_data` fixture are gone, and two working-directory-relative paths are 
absolute.
   - A single `#![allow(dead_code)]` replaces ten per-function attributes, 
since each test binary
     compiles `common` separately and uses a subset.
   - `coalesce`, `null_aware` and `parallel_window` use a `TempDir` instead of 
a fixed path under the
     system temp directory.
   - `customers` is written as a one-file directory (`customers/part-0.csv`) so 
it registers through
     `register_csv_tables`. It has the same rows, one file and one scan 
partition.
   - `SET` values are sent quoted (`SET k = '4'`), which DataFusion treats the 
same as `= 4`.
   - Removes `ballista/client/testdata/single_nan.parquet`, which nothing 
references.
   
   The contributor guide (`docs/source/contributors-guide/development.md`) 
gains a "Test fixtures"
   section with the rule for where a fixture goes and a pointer to the fixtures 
this PR adds.
   
   # Testing
   
   Rebased onto `main` at #2790. Run on this branch:
   
   - `cargo test -p ballista --tests`: 207 passed, 0 failed (every test starts 
an in-process
     scheduler and executor).
   - `cargo test -p ballista --tests -- --list` is identical before and after 
(207 tests).
   - `cargo fmt --all -- --check`, `cargo clippy -p ballista --all-targets 
--all-features -- -D warnings`
     and `cargo check -p ballista --tests --features test_extended_stack` 
(which builds `bugs.rs`).
   
   # Are there any user-facing changes?
   
   No. Test code 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