dhruv-dagar opened a new pull request, #11422: URL: https://github.com/apache/arrow-rs/pull/11422
# Which issue does this PR close? - Closes #11388 # Rationale for this change Malformed or incomplete Arrow C Stream Interface inputs can cause `ArrowArrayStreamReader` to panic when required callbacks are missing. In particular, the absence of the `get_schema` or `get_next` callback currently results in an `Option::unwrap()` panic instead of being reported as an error. The reader should handle these invalid inputs gracefully by returning an appropriate `CDataInterface` error. # What changes are included in this PR? - Handle a missing `get_schema` callback in `get_stream_schema` by returning a `CDataInterface` error. - Handle a missing `get_next` callback in `ArrowArrayStreamReader::next` by returning a `CDataInterface` error. - Add regression tests covering streams with missing `get_schema` and `get_next` callbacks. # Are these changes tested? Regression tests were added for both missing callback cases. The existing FFI stream tests continue to pass. # Are there any significant user-facing changes? No significant user-facing changes. This change replaces a panic caused by malformed C Stream Interface inputs with a proper `CDataInterface` error. -- 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]
