HeartSaVioR commented on a change in pull request #24050: [MINOR][SQL] 
Deduplicate codes reading from/writing to unsafe object
URL: https://github.com/apache/spark/pull/24050#discussion_r264117993
 
 

 ##########
 File path: 
common/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java
 ##########
 @@ -168,16 +169,11 @@ public UTF8String() {
    * bytes in this string.
    */
   public void writeToMemory(Object target, long targetOffset) {
-    Platform.copyMemory(base, offset, target, targetOffset, numBytes);
+    UnsafeHelper.writeToMemory(base, offset, target, targetOffset, numBytes);
 
 Review comment:
   This is just for consistency: `writeTo` will leverage 
`UnsafeHelper.writeToMemory` instead of this method, so it would be safer to 
make them be same.

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