MaxGekk commented on code in PR #44483:
URL: https://github.com/apache/spark/pull/44483#discussion_r1436954736
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala:
##########
@@ -911,6 +911,25 @@ case class WeekOfYear(child: Expression) extends
GetDateField {
copy(child = newChild)
}
+// scalastyle:off line.size.limit
Review Comment:
Is it really needed?
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala:
##########
@@ -196,6 +197,17 @@ object DateTimeUtils extends SparkDateTimeUtils {
localDateToDays(daysToLocalDate(days).plusMonths(months))
}
+ /**
+ * Returns the three-letter abbreviated month name for the given number of
days 1970-01-01.
+ */
+ def getMonthName(days: Int): UTF8String = {
+ val monthName = Month
+ .of(getMonth(days))
+ .getDisplayName(TextStyle.SHORT, Locale.US)
Review Comment:
Could you use `DateFormatter.defaultLocale`, please. (at least we don't
spread the default local settings across source 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]