Github user frreiss commented on a diff in the pull request:
https://github.com/apache/spark/pull/10460#discussion_r55738141
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala
---
@@ -889,6 +978,11 @@ case class Decode(bin: Expression, charset: Expression)
* (one of 'US-ASCII', 'ISO-8859-1', 'UTF-8', 'UTF-16BE', 'UTF-16LE',
'UTF-16').
* If either argument is null, the result will also be null.
*/
+@ExpressionDescription(
+ usage = "_FUNC_(string, charset) - Computes the first argument into a
BINARY using " +
+ "the provided charset (one of 'US-ASCII', 'ISO-8859-1', 'UTF-8',
'UTF-16BE', " +
+ "'UTF-16LE', 'UTF-16'). If either argument is null, the result will
also be null.",
+ extended = "> SELECT _FUNC_('SparkSql', 'UTF-8');\n [53 70 61 72 6B 53
71 6C]")
--- End diff --
On my Mac, the query `select Encode('SparkSql', 'UTF-8');` returns the
`SparkSql` in the spark-sql shell.
---
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]