MaxGekk commented on a change in pull request #35607:
URL: https://github.com/apache/spark/pull/35607#discussion_r813579311
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
##########
@@ -3141,3 +3141,88 @@ case class TimestampAdd(
copy(unit = newFirst, quantity = newSecond, timestamp = newThird)
}
}
+
+// scalastyle:off line.size.limit
+@ExpressionDescription(
+ usage = "_FUNC_(unit, startTimestamp, endTimestamp) - Gets the difference
between the timestamps `endTimestamp` and `startTimestamp` in the specified
units.",
+ arguments = """
+ Arguments:
+ * unit - this indicates the units of the difference between the given
timestamps.
Review comment:
The behavior has been described in PR's description already:
"... The function calculates the amount in terms of this unit, and returns a
**whole** number, representing the number of **complete units between the two
timestamps**. "
--
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]