Skip to content

Commit 032f6d9

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 #22137 from mengxr/minor-doc-fix. Authored-by: Xiangrui Meng <meng@databricks.com> Signed-off-by: hyukjinkwon <gurwls223@apache.org> (cherry picked from commit f454d52) Signed-off-by: hyukjinkwon <gurwls223@apache.org>
1 parent 34191e6 commit 032f6d9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

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
@@ -1653,10 +1653,9 @@ case class Left(str: Expression, len: Expression, child: Expression) extends Run
16531653
* A function that returns the char length of the given string expression or
16541654
* number of bytes of the given binary expression.
16551655
*/
1656+
// scalastyle:off line.size.limit
16561657
@ExpressionDescription(
1657-
usage = "_FUNC_(expr) - Returns the character length of string data or number of bytes of " +
1658-
"binary data. The length of string data includes the trailing spaces. The length of binary " +
1659-
"data includes binary zeros.",
1658+
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.",
16601659
examples = """
16611660
Examples:
16621661
> SELECT _FUNC_('Spark SQL ');
@@ -1666,6 +1665,7 @@ case class Left(str: Expression, len: Expression, child: Expression) extends Run
16661665
> SELECT CHARACTER_LENGTH('Spark SQL ');
16671666
10
16681667
""")
1668+
// scalastyle:on line.size.limit
16691669
case class Length(child: Expression) extends UnaryExpression with ImplicitCastInputTypes {
16701670
override def dataType: DataType = IntegerType
16711671
override def inputTypes: Seq[AbstractDataType] = Seq(TypeCollection(StringType, BinaryType))

0 commit comments

Comments
 (0)