You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "anoopj (via GitHub)" <gi...@apache.org> on 2026/08/20 16:53:20 UTC

Re: [PR] arrow: Fix memory leak in ColumnVector by caching decoded vector [iceberg]

anoopj commented on code in PR #17738:
URL: https://github.com/apache/iceberg/pull/17738#discussion_r3823602379


##########
arrow/src/main/java/org/apache/iceberg/arrow/vectorized/ColumnVector.java:
##########
@@ -86,6 +94,10 @@ public int numNulls() {
 
   @Override
   public void close() {
+    if (arrowVector != null) {

Review Comment:
   I suspect this doesn't fix the leak because the `close()` here is unreachable during a scan. `ArrowReader` owns the batches and doesn't call `ColumnarBatch.close()`. See the `ArrowReader` javadoc that says 
   
   >  The caller should not hold onto a {@link ColumnarBatch} or try to close them.
   



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org