viirya commented on code in PR #52747:
URL: https://github.com/apache/spark/pull/52747#discussion_r2475219755
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/execution/arrow/ArrowWriterWrapper.scala:
##########
@@ -60,6 +60,13 @@ case class ArrowWriterWrapper(
allocator = null
}
}
+
+ /**
+ * Clear the underlying VectorSchemaRoot to release the memory held by the
vectors.
Review Comment:
`clear` and `close` are same on `FieldVector`. `VectorSchemaRoot.clear`
additionally resets its `rowCount`, so yes, `VectorSchemaRoot` can be reused
after `clear`.
```
/** Alternative to clear(). Allows use as an AutoCloseable in
try-with-resources. */
@Override
void close();
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]