alamb opened a new pull request, #10097: URL: https://github.com/apache/arrow-rs/pull/10097
# Which issue does this PR close? Follow-up while reviewing #10044. # Rationale for this change While reviewing #10044 (which reworks the IPC writer's buffer handling), I found that the **compressed `IpcDataGenerator::encode` path is not exercised by any test in the repository**. Every IPC-compression test (`arrow-ipc` LZ4/ZSTD tests, the integration `ipc_writer` tests) goes through `FileWriter`/`StreamWriter`, and `arrow-flight` — the main consumer of `encode()` — never sets `batch_compression_type` in any test or example. Concretely, on the #10044 branch this leaves `arrow-ipc/src/writer.rs` line 2258 (the `IpcBodySink::Write` + compressed-buffer arm) uncovered: https://github.com/Rich-T-kid/arrow-rs/blob/ae0302346ec6505f73338e3f2142840b73b63aa8/arrow-ipc/src/writer.rs#L2258 This PR adds that missing coverage independently of #10044 (it also exercises the equivalent compressed `encode()` path on `main`). # What changes are included in this PR? - Refactor `verify_flight_round_trip` to share its encode/decode/assert logic via a new `verify_flight_round_trip_with_options(batches, options)` helper (no behavior change for existing callers). - Add `test_compression_round_trip`, which round-trips a batch (primitive + string columns) through `FlightDataEncoderBuilder` with both `LZ4_FRAME` and `ZSTD` IPC body compression, reusing the shared helper rather than duplicating fixtures. - Enable the `arrow-ipc` `lz4`/`zstd` features as `arrow-flight` dev-dependencies so the codecs are compiled in for tests. I confirmed via `cargo llvm-cov` (running only the new test) that it covers `writer.rs:2258` on the #10044 branch. # Are these changes tested? This PR is test-only. # Are there any user-facing changes? No. -- 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]
