viirya commented on code in PR #246:
URL:
https://github.com/apache/arrow-datafusion-comet/pull/246#discussion_r1555020334
##########
spark/src/main/scala/org/apache/spark/shuffle/sort/RowPartition.scala:
##########
@@ -32,8 +32,17 @@ class RowPartition(initialSize: Int) {
def getNumRows: Int = rowAddresses.size
- def getRowAddresses: Array[Long] = rowAddresses.toArray
- def getRowSizes: Array[Int] = rowSizes.toArray
+ def getRowAddresses: Array[Long] = {
+ val array = rowAddresses.toArray
+ rowAddresses = null
+ array
+ }
+
+ def getRowSizes: Array[Int] = {
+ val array = rowSizes.toArray
+ rowSizes = null
+ array
+ }
Review Comment:
i.e.,
```
long addrs[] = getRowAddresses();
long sizes[] = getRowSizes;
nativeSpilling(adds, sizes);
rowPartition.reset();
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]