Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1554,10 +1554,9 @@ case class Left(str: Expression, len: Expression, child: Expression) extends Run
* A function that returns the char length of the given string expression or
* number of bytes of the given binary expression.
*/
// scalastyle:off line.size.limit
@ExpressionDescription(
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.",
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.",
examples = """
Examples:
> SELECT _FUNC_('Spark SQL ');
Expand All @@ -1567,6 +1566,7 @@ case class Left(str: Expression, len: Expression, child: Expression) extends Run
> SELECT CHARACTER_LENGTH('Spark SQL ');
10
""")
// scalastyle:on line.size.limit
case class Length(child: Expression) extends UnaryExpression with ImplicitCastInputTypes {
override def dataType: DataType = IntegerType
override def inputTypes: Seq[AbstractDataType] = Seq(TypeCollection(StringType, BinaryType))
Expand Down