ZENOTME opened a new pull request, #11507: URL: https://github.com/apache/arrow-rs/pull/11507
# Which issue does this PR close? Closes #11468. # Rationale for this change Callers cannot distinguish unsupported type conversions from failures to convert input values when both return `CastError`. Returning `NotYetImplemented` for unsupported conversions lets callers distinguish these cases without parsing error messages. # What changes are included in this PR? The changes are split into two commits: - Return `NotYetImplemented` for unsupported conversions and document the error semantics of the public cast and Union extraction APIs. - Replace internal defensive error branches with `unreachable!()` where the callers already guarantee the required types, explaining each invariant in the panic message. Checks on user-supplied target types remain fallible. # Are these changes tested? Existing cast tests cover the affected paths. Error expectations are updated in the Map and Struct conversion tests; no new tests are added. The existing workspace tests and Clippy checks pass, along with formatting, spelling, documentation generation, and documentation tests. # Are there any significant user-facing changes? Unsupported conversions change error variant and the displayed prefix from `Cast error:` to `Not yet implemented:`. Supported conversions retain their existing value-error and null-handling behavior. Implementation and documentation were prepared with OpenAI Codex assistance. -- 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]
