You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/02/24 05:22:11 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #35607: [SPARK-38284][SQL] Add the `TIMESTAMPDIFF()` function

cloud-fan commented on a change in pull request #35607:
URL: https://github.com/apache/spark/pull/35607#discussion_r813555126



##########
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:
       shall we define the rounding behavior? e.g. if the actual result is 1.6 year, what do we return?




-- 
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-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org