Skip to content

Commit

Permalink
[SPARK-24378][SQL] Fix date_trunc function incorrect examples
Browse files Browse the repository at this point in the history
## What changes were proposed in this pull request?

Fix `date_trunc` function incorrect examples.

## How was this patch tested?

N/A

Author: Yuming Wang <[email protected]>

Closes #21423 from wangyum/SPARK-24378.
  • Loading branch information
wangyum authored and HyukjinKwon committed May 24, 2018
1 parent 13bedc0 commit 0d89943
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1533,14 +1533,14 @@ case class TruncDate(date: Expression, format: Expression)
""",
examples = """
Examples:
> SELECT _FUNC_('2015-03-05T09:32:05.359', 'YEAR');
2015-01-01T00:00:00
> SELECT _FUNC_('2015-03-05T09:32:05.359', 'MM');
2015-03-01T00:00:00
> SELECT _FUNC_('2015-03-05T09:32:05.359', 'DD');
2015-03-05T00:00:00
> SELECT _FUNC_('2015-03-05T09:32:05.359', 'HOUR');
2015-03-05T09:00:00
> SELECT _FUNC_('YEAR', '2015-03-05T09:32:05.359');
2015-01-01 00:00:00
> SELECT _FUNC_('MM', '2015-03-05T09:32:05.359');
2015-03-01 00:00:00
> SELECT _FUNC_('DD', '2015-03-05T09:32:05.359');
2015-03-05 00:00:00
> SELECT _FUNC_('HOUR', '2015-03-05T09:32:05.359');
2015-03-05 09:00:00
""",
since = "2.3.0")
// scalastyle:on line.size.limit
Expand Down

0 comments on commit 0d89943

Please sign in to comment.