Github user kiszk commented on a diff in the pull request:
https://github.com/apache/spark/pull/10488#discussion_r48534869
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/misc.scala
---
@@ -57,9 +57,10 @@ case class Md5(child: Expression) extends
UnaryExpression with ImplicitCastInput
* the hash length is not one of the permitted values, the return value is
NULL.
*/
@ExpressionDescription(
- usage = "_FUNC_(input, bitLength) - Returns a checksum of SHA-2 family
as a hex string of the " +
- "input. SHA-224, SHA-256, SHA-384, and SHA-512 are supported. Bit
length of 0 is equivalent " +
- "to 256",
+ usage =
+ """_FUNC_(input, bitLength) - Returns a checksum of SHA-2 family as a
hex string of the input.
+ SHA-224, SHA-256, SHA-384, and SHA-512 are supported. Bit length of
0 is equivalent to 256."""
+ ,
--- End diff --
In another way, I am trying to reproduce this compilation error in a
standalone test case. However, I cannot reproduce this failure (i.e.
compilations are successfully finished).
```
$ cat ExpressionDescription.java
import java.lang.annotation.*;
@Retention(RetentionPolicy.RUNTIME)
public @interface ExpressionDescription {
String usage() default "_FUNC_ is undocumented";
String extended() default "No example for _FUNC_.";
}
$ cat test.scala
@ExpressionDescription(
usage = "_FUNC_(input, bitLength) - Returns a checksum of SHA-2 family as
a hex string of the " +
"input. SHA-224, SHA-256, SHA-384, and SHA-512 are supported. Bit
length of 0 is equivalent " +
"to 256",
extended = "> SELECT _FUNC_('Spark', 0);\n " +
"'529bc3b07127ecb7e53a4dcf1991d9152c24537d919178022b2c42657f79a26b'")
class test {
def func() : Unit = {
val str = "abc" + "123" + "XYZ"
}
}
$ javac ExpressionDescription.java
$ ~/scala-2.11.7/bin/scalac test.scala
$
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]