You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/03/11 07:55:11 UTC

[GitHub] [spark] HeartSaVioR commented on a change in pull request #24050: [MINOR][SQL] Deduplicate codes reading from/writing to unsafe object

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:
users@infra.apache.org


With regards,
Apache Git Services

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