andygrove commented on code in PR #307: URL: https://github.com/apache/datafusion-comet/pull/307#discussion_r1576814855
########## core/src/execution/datafusion/expressions/cast.rs: ########## @@ -64,6 +68,25 @@ pub struct Cast { pub timezone: String, } +macro_rules! spark_cast_utf8_to_integral { + ($string_array:expr, $eval_mode:expr, $array_type:ty, $cast_method:ident) => {{ + let mut cast_array = PrimitiveArray::<$array_type>::builder($string_array.len()); + for i in 0..$string_array.len() { Review Comment: I think that `$string_array.len()` is already only computed once? -- 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