wForget commented on code in PR #47514:
URL: https://github.com/apache/spark/pull/47514#discussion_r1696442082
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/urlExpressions.scala:
##########
@@ -86,16 +86,18 @@ case class UrlEncode(child: Expression)
since = "3.4.0",
group = "url_funcs")
// scalastyle:on line.size.limit
-case class UrlDecode(child: Expression)
+case class UrlDecode(child: Expression, failOnError: Boolean = true)
extends RuntimeReplaceable with UnaryLike[Expression] with
ImplicitCastInputTypes {
+ def this(child: Expression) = this(child, true)
+
override lazy val replacement: Expression =
StaticInvoke(
UrlCodec.getClass,
SQLConf.get.defaultStringType,
"decode",
- Seq(child, Literal("UTF-8")),
- Seq(StringTypeAnyCollation, StringTypeAnyCollation))
+ Seq(child, Literal("UTF-8"), Literal(failOnError)),
Review Comment:
Thanks @yaooqinn , I will send a new PR to do it.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]