yaooqinn commented on code in PR #5115:
URL: https://github.com/apache/kyuubi/pull/5115#discussion_r1280074649


##########
externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/SparkOperation.scala:
##########
@@ -50,7 +50,7 @@ abstract class SparkOperation(session: Session)
 
   private val timeZone: ZoneId = {
     spark.conf.getOption(TIMEZONE_KEY).map { timeZoneId =>
-      ZoneId.of(timeZoneId.replaceFirst("(\\+|\\-)(\\d):", "$10$2:"), 
ZoneId.SHORT_IDS)
+      ZoneId.of(timeZoneId.replaceFirst("([+\\-])(\\d):", "$10$2:"), 
ZoneId.SHORT_IDS)

Review Comment:
   ```scala
     def getZoneId(timeZoneId: String): ZoneId = {
       val formattedZoneId = timeZoneId
         // To support the (+|-)h:mm format because it was supported before 
Spark 3.0.
         .replaceFirst("(\\+|\\-)(\\d):", "$10$2:")
         // To support the (+|-)hh:m format because it was supported before 
Spark 3.0.
         .replaceFirst("(\\+|\\-)(\\d\\d):(\\d)$", "$1$2:0$3")
   
       ZoneId.of(formattedZoneId, ZoneId.SHORT_IDS)
     }
   ```
   
   refer to upstream changes, we may change here with the above code



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