beliefer commented on a change in pull request #25172: [SPARK-28412][SQL] ANSI
SQL: OVERLAY function support byte array
URL: https://github.com/apache/spark/pull/25172#discussion_r322045431
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/functions.scala
##########
@@ -2527,6 +2527,17 @@ object functions {
Overlay(src.expr, lit(replaceString).expr, lit(pos).expr, lit(len).expr)
}
+ /**
+ * Overlay the specified portion of `src` with `replaceArray`,
+ * starting from byte position `pos` of input byte array and proceeding for
`len` bytes.
+ *
+ * @group string_funcs
+ * @since 3.0.0
+ */
+ def overlay(src: Column, replaceArray: Array[Byte], pos: Int, len: Int):
Column = withExpr {
+ Overlay(src.expr, lit(replaceArray).expr, lit(pos).expr, lit(len).expr)
Review comment:
I referenced the function `translate`, `trim`, `regexp_replace` that not use
`Column`.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]