seddonm1 commented on a change in pull request #9682: URL: https://github.com/apache/arrow/pull/9682#discussion_r592850234
########## File path: rust/arrow/src/compute/kernels/cast.rs ########## @@ -48,6 +48,15 @@ use crate::{array::*, compute::take}; use crate::{buffer::Buffer, util::serialization::lexical_to_string}; use num::{NumCast, ToPrimitive}; +/// CastOptions provides a way to override the default cast behaviors +#[derive(Debug)] +pub struct CastOptions { + /// how to handle cast failures, either return NULL (safe=true) or return ERR (safe=false) + pub safe: bool, Review comment: I think we _may_. The CPP implementation is here: https://github.com/apache/arrow/blob/a554ff753e8635923dccd59d42b988de0cf3868d/cpp/src/arrow/compute/cast.h#L45 and presumably these were added for justifiable reasons. It is always a tricky balance as my personal view is having too many options (like Spark) is way too intimidating. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org