cloud-fan commented on a change in pull request #28713: URL: https://github.com/apache/spark/pull/28713#discussion_r434352851
########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeFormatterHelper.scala ########## @@ -62,7 +62,16 @@ trait DateTimeFormatterHelper { accessor.get(ChronoField.HOUR_OF_DAY) } else if (accessor.isSupported(ChronoField.HOUR_OF_AMPM)) { // When we reach here, it means am/pm is not specified. Here we assume it's am. + // All of CLOCK_HOUR_OF_AMPM(h)/HOUR_OF_DAY(H)/CLOCK_HOUR_OF_DAY(k)/HOUR_OF_AMPM(K) will + // be resolved to HOUR_OF_AMPM here, we do not need to handle them separately accessor.get(ChronoField.HOUR_OF_AMPM) + } else if (accessor.isSupported(ChronoField.AMPM_OF_DAY) && + accessor.get(ChronoField.AMPM_OF_DAY) == 1) { + // When reach here, the `hour` part is missing, the pattern is always contains `a` and minute Review comment: the `hour` part is missing and PM is specified ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org