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


##########
spark/src/test/scala/org/apache/comet/CometCastSuite.scala:
##########
@@ -951,19 +954,47 @@ class CometCastSuite extends CometTestBase with 
AdaptiveSparkPlanHelper {
     }
   }
 
-  test("cast StringType to TimestampType disabled by default") {
-    withSQLConf((SQLConf.SESSION_LOCAL_TIMEZONE.key, "UTC")) {
-      val values = Seq("2020-01-01T12:34:56.123456", "T2").toDF("a")
-      castFallbackTest(
-        values.toDF("a"),
-        DataTypes.TimestampType,
-        "Not all valid formats are supported")
+  test("cast StringType to TimestampType - UTC") {
+    withSQLConf(SQLConf.SESSION_LOCAL_TIMEZONE.key -> "UTC") {

Review Comment:
   I intend to do that in a separate PR after the timezone and other formats 
support is also merged.



##########
native/spark-expr/src/conversion_funcs/string.rs:
##########
@@ -1095,31 +1108,31 @@ fn timestamp_parser<T: TimeZone>(
     // Define regex patterns and corresponding parsing functions
     let patterns = &[
         (
-            Regex::new(r"^\d{4,5}$").unwrap(),
+            Regex::new(r"^\d{4,7}$").unwrap(),

Review Comment:
   You're right all these regexes will be compiled on each invocation. This is 
existing behaviour. However, let me try to address that.



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