yaooqinn commented on a change in pull request #28313:
URL: https://github.com/apache/spark/pull/28313#discussion_r413991291
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
##########
@@ -1622,7 +1622,15 @@ trait TruncInstant extends BinaryExpression with
ImplicitCastInputTypes {
@ExpressionDescription(
usage = """
_FUNC_(date, fmt) - Returns `date` with the time portion of the day
truncated to the unit specified by the format model `fmt`.
- `fmt` should be one of ["week", "mon", "month", "mm", "quarter", "year",
"yyyy", "yy", "decade", "century", "millennium"]
+ """,
+ arguments = """
+ Arguments:
+ * date - date value or valid date string
+ * fmt - the format representing the unit to be truncated to
+ - "YEAR", "YYYY", "YY" - truncate to the first date of the year
+ - "QUARTER" - truncate to the closest quarter start date
+ - "MONTH", "MM", "MON" - truncate to the first date of the month
+ - "WEEK" - truncate to the closest Monday
Review comment:
my mistake.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]