MaxGekk commented on a change in pull request #23358: [SPARK-26424][SQL] Use
java.time API in date/timestamp expressions
URL: https://github.com/apache/spark/pull/23358#discussion_r243706141
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/TimestampFormatter.scala
##########
@@ -27,7 +29,19 @@ import org.apache.commons.lang3.time.FastDateFormat
import org.apache.spark.sql.internal.SQLConf
-sealed trait TimestampFormatter {
+sealed trait TimestampFormatter extends Serializable {
+ /**
+ * Parses a timestamp in a string and converts it to microseconds.
+ *
+ * @param s - string with timestamp to parse
+ * @return microseconds since epoch.
+ * @throws ParseException can be thrown by legacy parser
+ * @throws DateTimeParseException can be thrown by new parser
+ * @throws DateTimeException unable to obtain local date or time
+ */
+ @throws(classOf[ParseException])
+ @throws(classOf[DateTimeParseException])
+ @throws(classOf[DateTimeException])
Review comment:
This annotations are required in whole stage codegen otherwise I got an
error about some exception catches are not reachable/used.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]