ulysses-you commented on a change in pull request #32106:
URL: https://github.com/apache/spark/pull/32106#discussion_r611278320



##########
File path: 
common/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java
##########
@@ -1009,7 +1009,8 @@ public static UTF8String concatWs(UTF8String separator, 
UTF8String... inputs) {
 
     // Allocate a new byte array, and copy the inputs one by one into it.
     // The size of the new array is the size of all inputs, plus the 
separators.
-    final byte[] result = new byte[numInputBytes + (numInputs - 1) * 
separator.numBytes];
+    int intNumInputBytes = Ints.checkedCast(numInputBytes + (numInputs - 1) * 
separator.numBytes);

Review comment:
       Replaced 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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to