sebdotv commented on code in PR #43360:
URL: https://github.com/apache/arrow/pull/43360#discussion_r1687630914


##########
go/parquet/pqarrow/helpers.go:
##########
@@ -38,6 +38,8 @@ func releaseArrayData(data []arrow.ArrayData) {
 
 func releaseColumns(columns []arrow.Column) {
        for _, col := range columns {
-               col.Release()
+               if col.Data() != nil { // data can be nil due to the way 
columns are constructed in ReadRowGroups

Review Comment:
   I'm not sure about this change; with it, I feel that it would imply that a 
`Column` with `nil` `data` is a valid instance.
   The issue with `ReadRowGroups` is that it prepares a `[]Column`, which in 
error cases can be partially initialized, and then needs to release it.
   So, conditional release is really a concern of the `[]arrow.Column` type, 
not of the `Column` type.
   
   But I don't have any experience with this code base, so I'm also happy to 
make the change you suggest.



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

Reply via email to