Skip to content

Commit 565368d

Browse files
committed
Fix examples
1 parent 9ffa734 commit 565368d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ case class IntegralDivide(left: Expression, right: Expression) extends DivModLik
450450
Examples:
451451
> SELECT 2 _FUNC_ 1.8;
452452
0.2
453-
> SELECT MOD(2, 1.8);
453+
> SELECT _FUNC_(2, 1.8);
454454
0.2
455455
""")
456456
case class Remainder(left: Expression, right: Expression) extends DivModLike {

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1097,7 +1097,7 @@ case class TimeAdd(start: Expression, interval: Expression, timeZoneId: Option[S
10971097
usage = "_FUNC_(timestamp, timezone) - Given a timestamp like '2017-07-14 02:40:00.0', interprets it as a time in UTC, and renders that time as a timestamp in the given time zone. For example, 'GMT+1' would yield '2017-07-14 03:40:00.0'.",
10981098
examples = """
10991099
Examples:
1100-
> SELECT from_utc_timestamp('2016-08-31', 'Asia/Seoul');
1100+
> SELECT _FUNC_('2016-08-31', 'Asia/Seoul');
11011101
2016-08-31 09:00:00
11021102
""",
11031103
since = "1.5.0",

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,7 +1123,7 @@ case class SubstringIndex(strExpr: Expression, delimExpr: Expression, countExpr:
11231123
4
11241124
> SELECT _FUNC_('bar', 'foobarbar', 5);
11251125
7
1126-
> SELECT POSITION('bar' IN 'foobarbar');
1126+
> SELECT _FUNC_('bar' IN 'foobarbar');
11271127
4
11281128
""",
11291129
since = "1.5.0")
@@ -1732,9 +1732,9 @@ case class Left(str: Expression, len: Expression, child: Expression) extends Run
17321732
Examples:
17331733
> SELECT _FUNC_('Spark SQL ');
17341734
10
1735-
> SELECT CHAR_LENGTH('Spark SQL ');
1735+
> SELECT _FUNC_('Spark SQL ');
17361736
10
1737-
> SELECT CHARACTER_LENGTH('Spark SQL ');
1737+
> SELECT _FUNC_('Spark SQL ');
17381738
10
17391739
""",
17401740
since = "1.5.0")

0 commit comments

Comments
 (0)