vidyasankarv commented on code in PR #383: URL: https://github.com/apache/datafusion-comet/pull/383#discussion_r1600987926
########## core/src/execution/datafusion/expressions/cast.rs: ########## @@ -1444,13 +1483,136 @@ fn parse_str_to_time_only_timestamp(value: &str) -> CometResult<Option<i64>> { Ok(Some(timestamp)) } +//a string to date parser - port of spark's SparkDateTimeUtils#stringToDate. +fn date_parser(date_str: &str, eval_mode: EvalMode) -> CometResult<Option<i32>> { + // local functions + fn get_trimmed_start(bytes: &[u8]) -> usize { Review Comment: @kazuyukitanimura ye this is a port of scala's implementation https://github.com/apache/spark/blob/7e79e91dc8c531ee9135f0e32a9aa2e1f80c4bbf/sql/api/src/main/scala/org/apache/spark/sql/catalyst/util/SparkDateTimeUtils.scala#L312 was suggested @parthchandra in a previous comment. leaving as is for now based on above comment from @andygrove. hope thats ok with you too. -- 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