andygrove commented on code in PR #335:
URL: https://github.com/apache/datafusion-comet/pull/335#discussion_r1581834740


##########
core/src/execution/datafusion/expressions/cast.rs:
##########
@@ -222,3 +263,139 @@ impl PhysicalExpr for Cast {
         self.hash(&mut s);
     }
 }
+
+fn parse_timestamp(value: &str, eval_mode: EvalMode) -> 
CometResult<Option<i64>> {
+    let value = value.trim();
+    if value.is_empty() {
+        return Ok(None);
+    }
+    
+    // Define regex patterns and corresponding parsing functions

Review Comment:
   The regex approach is a good way to quickly get support for all of the 
format variations and fix the correctness issue but could also be quite 
expensive. It would be good to add some criterion benchmarks so that we can 
understand what performance looks like (does not have to be part of this PR).
   
   



-- 
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

Reply via email to