sadikovi commented on a change in pull request #34596: URL: https://github.com/apache/spark/pull/34596#discussion_r752700011
########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/TimestampFormatter.scala ########## @@ -71,6 +71,19 @@ sealed trait TimestampFormatter extends Serializable { s"The method `parseWithoutTimeZone(s: String)` should be implemented in the formatter " + "of timestamp without time zone") + /** + * Returns true if the parsed timestamp contains the time zone component, false otherwise. + * Used to determine if the timestamp can be inferred as timestamp without time zone. + * + * @param s - string with timestamp to inspect + * @return whether the timestamp string has the time zone component defined. + */ + @throws(classOf[IllegalStateException]) + def isTimeZoneSet(s: String): Boolean = Review comment: I can update. IMHO, it is tricky to check this statically as there does not seem to be a way of checking pattern components and we need an actual value to validate whether or not it has a zone offset. -- 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: reviews-unsubscr...@spark.apache.org 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