You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/05/07 13:23:54 UTC
[GitHub] [spark] AngersZhuuuu commented on a change in pull request #32444: [SPARK-35111][SPARK-35112][SQL][FOLLOWUP] Support Cast string to year-month interval
AngersZhuuuu commented on a change in pull request #32444:
URL: https://github.com/apache/spark/pull/32444#discussion_r628206809
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/IntervalUtils.scala
##########
@@ -99,15 +99,16 @@ object IntervalUtils {
result
}
- private val yearMonthPattern = "^([+|-])?(\\d+)-(\\d+)$".r
- private val yearMonthStringPattern =
- "(?i)^(INTERVAL\\s+)([+|-])?(')([+|-])?(\\d+)-(\\d+)(')(\\s+YEAR\\s+TO\\s+MONTH)$".r
+ private val unquotedYearMonthRegex = "([+|-])?(\\d+)-(\\d+)".r
+ private val quotedYearMonthPattern = (s"^$unquotedYearMonthRegex$$").r
Review comment:
> I don't really see what "quoted" means here...
he may want to mean it without `^` and `$`
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org