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/17 01:16:31 UTC

[GitHub] [spark] HyukjinKwon commented on a change in pull request #35502: [SPARK-38195][SQL] Add the `TIMESTAMPADD()` function

HyukjinKwon commented on a change in pull request #35502:
URL: https://github.com/apache/spark/pull/35502#discussion_r808587811



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
##########
@@ -3057,3 +3057,87 @@ case class ConvertTimezone(
     copy(sourceTz = newFirst, targetTz = newSecond, sourceTs = newThird)
   }
 }
+
+// scalastyle:off line.size.limit
+@ExpressionDescription(
+  usage = "_FUNC_(unit, interval, timestamp) - Adds the specified number of units to the given timestamp.",
+  arguments = """
+    Arguments:
+      * unit - this indicates the units of datetime that you want to add.
+        Supported string values of `unit` are (case insensitive):
+          - "YEAR", "SQL_TSI_YEAR"
+          - "QUARTER", "SQL_TSI_QUARTER" - 3 months
+          - "MONTH", "SQL_TSI_MONTH"
+          - "WEEK", "SQL_TSI_WEEK" - 7 days
+          - "DAY", "DAYOFYEAR", "SQL_TSI_DAY", "SQL_TSI_DAYOFYEAR"
+          - "HOUR", "SQL_TSI_HOUR"
+          - "MINUTE", "SQL_TSI_MINUTE"
+          - "SECOND", "SQL_TSI_SECOND"
+          - "MILLISECOND", "SQL_TSI_FRAC_SECOND" - milliseconds
+          - "MICROSECOND"
+      * interval - this is the number of units of time that you want to add.
+      * timestamp - This is a timestamp (w/ or w/o timezone) to which you want to add.

Review comment:
       nit ... 
   
   ```suggestion
         * timestamp - this is a timestamp (w/ or w/o timezone) to which you want to add.
   ```




-- 
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