RanaPriyansh opened a new pull request, #11293: URL: https://github.com/apache/arrow-rs/pull/11293
# Which issue does this PR close? - Closes #4234. # Rationale for this change `FlightDataEncoder` can encode a batch whose input schema differs from the stream schema. In Hydrate mode, an extra column can be omitted without an error. # What changes are included in this PR? The encoder compares each batch's original schema with the supplied schema or the first batch's schema. It returns a schema error before dictionary hydration or batch encoding when schemas differ. # Are these changes tested? Public encoder-stream tests cover first and later batch mismatches in Hydrate and Resend modes. They cover extra columns, field names, types, nullability, and metadata. A matching-schema control round-trips changed dictionary values. `cargo test -p arrow-flight`, `cargo test -p arrow-flight --all-features`, the Flight SQL example tests, Clippy, format, and crate documentation checks pass locally. # Are there any user-facing changes? Streams with mismatched input batch schemas now return an error and end. Matching-schema streams and the encoded schema remain unchanged. Codex used. AI generated the implementation, tests, and PR description. -- 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]
