parthchandra commented on code in PR #1385: URL: https://github.com/apache/datafusion-comet/pull/1385#discussion_r1951870079
########## native/spark-expr/src/conversion_funcs/cast.rs: ########## @@ -872,6 +872,13 @@ fn cast_array( let array = array_with_timezone(array, cast_options.timezone.clone(), Some(to_type))?; let from_type = array.data_type().clone(); + let native_cast_options: CastOptions = CastOptions { + safe: !matches!(cast_options.eval_mode, EvalMode::Ansi), // take safe mode from cast_options passed + format_options: FormatOptions::new() Review Comment: Fair enough. (The format options are used only to make the cast of timestamp to string compatible with Spark, and are not needed anywhere else) but I guess it is a good idea to be consistent everywhere. -- 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...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org