cloud-fan commented on a change in pull request #28195: 
[SPARK-31425][SQL][CORE] 
UnsafeKVExternalSorter/VariableLengthRowBasedKeyValueBatch should also respect 
UnsafeAlignedOffset
URL: https://github.com/apache/spark/pull/28195#discussion_r407951191
 
 

 ##########
 File path: 
sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/VariableLengthRowBasedKeyValueBatch.java
 ##########
 @@ -141,14 +145,16 @@ public boolean next() {
           return false;
         }
 
-        totalLength = Platform.getInt(base, offsetInPage) - 4;
-        currentklen = Platform.getInt(base, offsetInPage + 4);
+        int uaoSize = UnsafeAlignedOffset.getUaoSize();
+        int doubleUaoSize = uaoSize + uaoSize;
 
 Review comment:
   let's be consistent with 
https://github.com/apache/spark/pull/28195/files#diff-ed82c6d7b012a3bf89fc2974e2840deaR46

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