stevomitric commented on code in PR #57931:
URL: https://github.com/apache/spark/pull/57931#discussion_r3958162534


##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/StringExpressionsSuite.scala:
##########
@@ -836,6 +836,44 @@ class StringExpressionsSuite extends SparkFunSuite with 
ExpressionEvalHelper {
       Literal.create(-10, IntegerType)), "__park SQL")

Review Comment:
   can you try the fix with the most negative value?
   
   ```
   SELECT
       overlay('Spark SQL' PLACING '_' FROM -2147483648 FOR 0) AS str_result,
       CAST(overlay(CAST('Spark SQL' AS BINARY) PLACING CAST('_' AS BINARY)
            FROM -2147483648 FOR 0) AS STRING)                 AS bin_result;
   ```
   
   results should match but i think we drop the last character on `str_result`.



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

Reply via email to