maropu commented on a change in pull request #30479:
URL: https://github.com/apache/spark/pull/30479#discussion_r539061140
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala
##########
@@ -2082,6 +2083,65 @@ case class UnBase64(child: Expression)
}
}
+object Decode {
+ def createExpr(params: Seq[Expression]): Expression = {
+ params.length match {
+ case 0 | 1 =>
+ throw new AnalysisException("Invalid number of arguments for function
decode. " +
+ s"Expected: 2; Found: ${params.length}")
+ case 2 => StringDecode(params.head, params.last)
Review comment:
hm, IMHO it would be good to rename the existing `decode` func or assign
a new name into the new `decode` func because the generated doc for `decode`
will be complicated.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]