sadikovi commented on a change in pull request #34596:
URL: https://github.com/apache/spark/pull/34596#discussion_r757952876
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
##########
@@ -465,8 +470,19 @@ object DateTimeUtils {
}
}
+ /**
+ * Trims and parses a given UTF8 string to a corresponding [[Long]] value
which representing the
+ * number of microseconds since the epoch. The result is independent of time
zones. Zone id
+ * component will be discarded and ignored.
+ * The return type is [[Option]] in order to distinguish between 0L and
null. Please
+ * refer to `parseTimestampString` for the allowed formats.
+ */
+ def stringToTimestampWithoutTimeZone(s: UTF8String): Option[Long] = {
+ stringToTimestampWithoutTimeZone(s, false)
Review comment:
I used `false` to preserve the original behaviour.
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
##########
@@ -465,8 +470,19 @@ object DateTimeUtils {
}
}
+ /**
+ * Trims and parses a given UTF8 string to a corresponding [[Long]] value
which representing the
+ * number of microseconds since the epoch. The result is independent of time
zones. Zone id
+ * component will be discarded and ignored.
+ * The return type is [[Option]] in order to distinguish between 0L and
null. Please
+ * refer to `parseTimestampString` for the allowed formats.
+ */
+ def stringToTimestampWithoutTimeZone(s: UTF8String): Option[Long] = {
+ stringToTimestampWithoutTimeZone(s, false)
Review comment:
I used `false` to preserve the original behaviour in this method and the
one below.
--
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]