Skip to content

Commit f454d52

Browse files
mengxrHyukjinKwon
authored andcommitted
[MINOR][DOC][SQL] use one line for annotation arg value
## What changes were proposed in this pull request? Put annotation args in one line, or API doc generation will fail. ~~~ [error] /Users/meng/src/spark/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala:1559: annotation argument needs to be a constant; found: "_FUNC_(expr) - Returns the character length of string data or number of bytes of ".+("binary data. The length of string data includes the trailing spaces. The length of binary ").+("data includes binary zeros.") [error] "binary data. The length of string data includes the trailing spaces. The length of binary " + [error] ^ [info] No documentation generated with unsuccessful compiler run [error] one error found [error] (catalyst/compile:doc) Scaladoc generation failed [error] Total time: 27 s, completed Aug 17, 2018 3:20:08 PM ~~~ ## How was this patch tested? sbt catalyst/compile:doc passed Closes apache#22137 from mengxr/minor-doc-fix. Authored-by: Xiangrui Meng <meng@databricks.com> Signed-off-by: hyukjinkwon <gurwls223@apache.org>
1 parent e3cf13d commit f454d52

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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
@@ -1554,10 +1554,9 @@ case class Left(str: Expression, len: Expression, child: Expression) extends Run
15541554
* A function that returns the char length of the given string expression or
15551555
* number of bytes of the given binary expression.
15561556
*/
1557+
// scalastyle:off line.size.limit
15571558
@ExpressionDescription(
1558-
usage = "_FUNC_(expr) - Returns the character length of string data or number of bytes of " +
1559-
"binary data. The length of string data includes the trailing spaces. The length of binary " +
1560-
"data includes binary zeros.",
1559+
usage = "_FUNC_(expr) - Returns the character length of string data or number of bytes of binary data. The length of string data includes the trailing spaces. The length of binary data includes binary zeros.",
15611560
examples = """
15621561
Examples:
15631562
> SELECT _FUNC_('Spark SQL ');
@@ -1567,6 +1566,7 @@ case class Left(str: Expression, len: Expression, child: Expression) extends Run
15671566
> SELECT CHARACTER_LENGTH('Spark SQL ');
15681567
10
15691568
""")
1569+
// scalastyle:on line.size.limit
15701570
case class Length(child: Expression) extends UnaryExpression with ImplicitCastInputTypes {
15711571
override def dataType: DataType = IntegerType
15721572
override def inputTypes: Seq[AbstractDataType] = Seq(TypeCollection(StringType, BinaryType))

0 commit comments

Comments
 (0)