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

   # Which issue does this PR close?
   
   - Closes #11468
   
   # Rationale for this change
   
   Unsupported source/target type pairs currently fall through to `CastError`, 
the same error used when a supported conversion cannot convert particular 
values. This makes callers unable to distinguish an unsupported cast from 
invalid input. The issue discussion recommends `NotYetImplemented` for 
unsupported conversions to preserve compatibility.
   
   # What changes are included in this PR?
   
   Unsupported cast dispatch paths now return `ArrowError::NotYetImplemented`. 
Value-level conversion failures remain `ArrowError::CastError`. Rustdoc and 
regression tests cover both behaviours.
   
   # Are these changes tested?
   
   - `cargo test -p arrow-cast --all-features` (411 unit, 55 integration, and 
15 doc tests passed)
   - `cargo fmt --all -- --check`
   - `git diff --check`
   - `cargo clippy -p arrow-cast --all-targets --all-features -- -D warnings` 
completed successfully; installed Clippy reported an existing unknown-lint 
warning for `clippy::assert_is_empty`.
   
   The unsupported-cast regression test failed against the original 
implementation because it returned the wrong error variant, and passed after 
this change.
   
   # Are there any significant user-facing changes?
   
   Callers now receive `NotYetImplemented` for unsupported type pairs. Invalid 
values for supported conversions continue to return `CastError`.
   


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