alamb commented on issue #8059:
URL: https://github.com/apache/arrow-rs/issues/8059#issuecomment-3167642459

   > Also, how should we handle `Decimal256`? Since there’s no 
`VariantDecimal32` equivalent, should we try casting it to `VariantDecimal16` 
and panic on overflow?
   > 
   > Thank you very much!
   
   I don't think we should panic
   
   I think we should try to convert and if it can't be converted then set the 
corresponding element to Variant::Null and the array element to null
   
   Some people may prefer an error to be returned in this case (a so called 
`safe` cast)
   
   Eventually maybe we want to create another function 
`cast_to_variant_with_options` or something that takes a CastOptions, following 
the model of the 
[`cast`](https://docs.rs/arrow/latest/arrow/compute/kernels/cast/index.html) 
kernel 🤔 


-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to