LuciferYang commented on a change in pull request #34237:
URL: https://github.com/apache/spark/pull/34237#discussion_r725893803
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeFormatterHelper.scala
##########
@@ -280,6 +280,7 @@ private object DateTimeFormatterHelper {
// 2.4, the SimpleDateFormat uses Monday as the first day of week.
final val weekBasedLetters = Set('Y', 'W', 'w', 'u', 'e', 'c')
final val unsupportedLetters = Set('A', 'n', 'N', 'p')
+ final val unknownPatternLetters: Set[Char] = Set('B')
Review comment:
@MaxGekk Both `unsupportedLetters` and `unknownPatternLetters` are used
for explicitly banned some
pattern letters and throw `IllegalArgumentException`
The only difference is the content of the error message, throw
`IllegalArgumentException` with `Unknown pattern letter: $c` Is the current
behavior.
If we accept the change of error message content, we can reuse
`unsupportedLetters`.
--
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]