zeroshade commented on code in PR #762:
URL: https://github.com/apache/iceberg-go/pull/762#discussion_r2874964645


##########
table/arrow_scanner.go:
##########
@@ -232,7 +232,12 @@ func enrichRecordsWithPosDeleteFields(ctx context.Context, 
filePath iceberg.Data
                        posBuilder.Append(i)
                }
 
-               columns := append(inData.Columns(), filePathBuilder.NewArray(), 
posBuilder.NewArray())
+               filePathArr := filePathBuilder.NewArray()
+               defer filePathArr.Release()
+               posArr := posBuilder.NewArray()
+               defer posArr.Release()
+
+               columns := append(inData.Columns(), filePathArr, posArr)

Review Comment:
   might be simpler to use a `RecordBuilder` instead, which would manage the 
refcounts for you, can you give that a try?



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

Reply via email to