jiangxb1987 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_r408609505
##########
File path:
sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/VariableLengthRowBasedKeyValueBatch.java
##########
@@ -41,18 +42,20 @@
@Override
public UnsafeRow appendRow(Object kbase, long koff, int klen,
Object vbase, long voff, int vlen) {
- final long recordLength = 8L + klen + vlen + 8;
+ int uaoSize = UnsafeAlignedOffset.getUaoSize();
+ int doubleUaoSize = 2 * uaoSize;
Review comment:
`doubleUaoSize` sounds strange, I'd keep the 2 * uaoSize in the
computation...
----------------------------------------------------------------
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]