This is an automated email from the ASF dual-hosted git repository. gurwls223 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push: new 5182aa2 [MINOR][DOCS] Correct date_trunc docs 5182aa2 is described below commit 5182aa25f017fe7ef3616e8f4459296d13dbb716 Author: Seth Fitzsimmons <s...@mojodna.net> AuthorDate: Sat May 4 09:13:23 2019 +0900 [MINOR][DOCS] Correct date_trunc docs ## What changes were proposed in this pull request? `date_trunc` argument order was flipped, phrasing was awkward. ## How was this patch tested? Documentation-only. Closes #24522 from mojodna/patch-2. Authored-by: Seth Fitzsimmons <s...@mojodna.net> Signed-off-by: HyukjinKwon <gurwls...@apache.org> --- sql/core/src/main/scala/org/apache/spark/sql/functions.scala | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sql/core/src/main/scala/org/apache/spark/sql/functions.scala b/sql/core/src/main/scala/org/apache/spark/sql/functions.scala index f92bf79..1abda54 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/functions.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/functions.scala @@ -2943,8 +2943,8 @@ object functions { * * @param date A date, timestamp or string. If a string, the data must be in a format that can be * cast to a date, such as `yyyy-MM-dd` or `yyyy-MM-dd HH:mm:ss.SSSS` - * @param format: 'year', 'yyyy', 'yy' for truncate by year, - * or 'month', 'mon', 'mm' for truncate by month + * @param format: 'year', 'yyyy', 'yy' to truncate by year, + * or 'month', 'mon', 'mm' to truncate by month * * @return A date, or null if `date` was a string that could not be cast to a date or `format` * was an invalid value @@ -2958,11 +2958,11 @@ object functions { /** * Returns timestamp truncated to the unit specified by the format. * - * For example, `date_tunc("2018-11-19 12:01:19", "year")` returns 2018-01-01 00:00:00 + * For example, `date_trunc("year", "2018-11-19 12:01:19")` returns 2018-01-01 00:00:00 * - * @param format: 'year', 'yyyy', 'yy' for truncate by year, - * 'month', 'mon', 'mm' for truncate by month, - * 'day', 'dd' for truncate by day, + * @param format: 'year', 'yyyy', 'yy' to truncate by year, + * 'month', 'mon', 'mm' to truncate by month, + * 'day', 'dd' to truncate by day, * Other options are: 'second', 'minute', 'hour', 'week', 'month', 'quarter' * @param timestamp A date, timestamp or string. If a string, the data must be in a format that * can be cast to a timestamp, such as `yyyy-MM-dd` or `yyyy-MM-dd HH:mm:ss.SSSS` --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org