maropu 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_r308536722
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/StringExpressionsSuite.scala
##########
@@ -452,6 +452,45 @@ class StringExpressionsSuite extends SparkFunSuite with
ExpressionEvalHelper {
// scalastyle:on
}
+ test("overlay for byte array") {
+ val input = Literal(Array[Byte](1, 2, 3, 4, 5, 6, 7, 8, 9))
+ checkEvaluation(new Overlay(input, Literal(Array[Byte](-1)),
+ Literal.create(6, IntegerType)), Array[Byte](1, 2, 3, 4, 5, -1, 7, 8, 9))
Review comment:
In this pr, plz follow the current behaivour of overlay(string, string). If
you wanna to change this behaivour, you can make an another pr for that.
----------------------------------------------------------------
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]