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


##########
spark/src/test/scala/org/apache/comet/CometCastSuite.scala:
##########
@@ -563,8 +565,54 @@ class CometCastSuite extends CometTestBase with 
AdaptiveSparkPlanHelper {
     castTest(generateStrings(numericPattern, 8).toDF("a"), 
DataTypes.BinaryType)
   }
 
-  ignore("cast StringType to DateType") {
+  test("cast StringType to DateType") {
     // https://github.com/apache/datafusion-comet/issues/327

Review Comment:
   nit lets move this comment of the issue number to `cast StringType to 
DataType - Fuzz Test`



##########
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:
   Is this defined because we cannot use `String#trim()` or `trim_matches`?



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