07ARB commented on a change in pull request #26477: [SPARK-29776][SQL] rpad 
should return NULL when padstring parameter is empty
URL: https://github.com/apache/spark/pull/26477#discussion_r361454068
 
 

 ##########
 File path: 
common/unsafe/src/test/scala/org/apache/spark/unsafe/types/UTF8StringPropertyCheckSuite.scala
 ##########
 @@ -168,7 +168,8 @@ class UTF8StringPropertyCheckSuite extends FunSuite with 
ScalaCheckDrivenPropert
       if (length <= origin.length) {
         origin.substring(0, length)
       } else {
-        if (pad.length == 0) return origin
+        if (pad.length == 0 && isLPad) return origin
+        if(pad.length == 0) return null
 
 Review comment:
   ok

----------------------------------------------------------------
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]

Reply via email to