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_r308540317
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala
 ##########
 @@ -458,6 +458,7 @@ case class StringReplace(srcExpr: Expression, searchExpr: 
Expression, replaceExp
 object Overlay {
 
   def calculate(input: UTF8String, replace: UTF8String, pos: Int, len: Int): 
UTF8String = {
+    require(pos > 0, "If you specify `pos`, it must be a positive whole 
number.")
 
 Review comment:
   Yes. But I think we should supplement 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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to