Boulea7 opened a new pull request, #10611:
URL: https://github.com/apache/arrow-rs/pull/10611

   # Which issue does this PR close?
   
   - Closes #10382.
   
   # Rationale for this change
   
   CSV readers configured with a projection yielded projected `RecordBatch` 
values, but the `RecordBatchReader::schema` implementation on `BufReader` still 
reported the unprojected input schema. This made the reader's advertised schema 
disagree with the batches it produced.
   
   # What changes are included in this PR?
   
   - Reuse a shared projected-schema helper for both CSV reader schema APIs.
   - Build projected schemas with `Schema::project`.
   - Add regression coverage for no projection, an empty projection, a 
single-column projection, and reordered columns.
   
   # Are these changes tested?
   
   Yes. The following checks passed locally:
   
   - `cargo test -p arrow-csv --all-features`
   - `cargo fmt --all -- --check`
   - `cargo clippy -p arrow-csv --all-targets --all-features -- -D warnings`
   - `cargo clippy -p arrow-csv -- -D unused_crate_dependencies`
   - `cargo clippy -p arrow-csv --all-features -- -D unused_crate_dependencies`
   - `cargo clippy -p arrow-csv --no-default-features -- -D 
unused_crate_dependencies`
   
   # Are there any user-facing changes?
   
   Yes. `RecordBatchReader::schema` now reports the projected schema for 
projected CSV readers, matching the schema of the record batches they produce. 
There is no public API change.
   
   # AI usage
   
   OpenAI Codex assisted with implementing the shared projected-schema logic 
and regression test. I reviewed every generated change and can debug and 
maintain it.
   


-- 
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]

Reply via email to