vaibhawvipul commented on code in PR #627: URL: https://github.com/apache/datafusion-comet/pull/627#discussion_r1678205173
########## native/spark-expr/src/cast.rs: ########## @@ -724,26 +732,31 @@ impl Cast { .downcast_ref::<GenericStringArray<i32>>() .expect("Expected a string array"); - let cast_array: ArrayRef = match to_type { - DataType::Date32 => { - let len = string_array.len(); - let mut cast_array = PrimitiveArray::<Date32Type>::builder(len); - for i in 0..len { - if !string_array.is_null(i) { - match date_parser(string_array.value(i), eval_mode) { - Ok(Some(cast_value)) => cast_array.append_value(cast_value), - Ok(None) => cast_array.append_null(), - Err(e) => return Err(e), - } - } else { - cast_array.append_null() - } + if to_type != &DataType::Date32 { Review Comment: yes, no logic change here. -- 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