parthchandra commented on code in PR #383:
URL: https://github.com/apache/datafusion-comet/pull/383#discussion_r1610670927


##########
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:
   > Spark skips characters rather than calling trim because it is more 
efficient (avoids extra memory allocation).
   
   effectively a str slice
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to