parthchandra commented on code in PR #383: URL: https://github.com/apache/datafusion-comet/pull/383#discussion_r1591232254
########## core/src/execution/datafusion/expressions/cast.rs: ########## @@ -274,16 +291,20 @@ impl Cast { (DataType::Utf8, DataType::Timestamp(_, _)) => { Self::cast_string_to_timestamp(&array, to_type, self.eval_mode)? } + (DataType::Utf8, DataType::Date32) + | (DataType::Utf8, DataType::Date64) => { + Self::cast_string_to_date(&array, to_type, self.eval_mode)? + } (DataType::Int64, DataType::Int32) | (DataType::Int64, DataType::Int16) | (DataType::Int64, DataType::Int8) | (DataType::Int32, DataType::Int16) | (DataType::Int32, DataType::Int8) | (DataType::Int16, DataType::Int8) - if self.eval_mode != EvalMode::Try => - { - Self::spark_cast_int_to_int(&array, self.eval_mode, from_type, to_type)? - } + if self.eval_mode != EvalMode::Try => Review Comment: Seems like unnecessary re-formatting (multiple places). ########## core/src/execution/datafusion/expressions/cast.rs: ########## @@ -107,7 +108,23 @@ macro_rules! cast_utf8_to_timestamp { result }}; } - +macro_rules! cast_utf8_to_date { Review Comment: Any reason why this is a macro and not a function? I see only one usage (maybe I missed something). -- 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