daniel-adam-tfs commented on code in PR #547:
URL: https://github.com/apache/arrow-go/pull/547#discussion_r2737527182
##########
parquet/file/row_group_reader.go:
##########
@@ -134,11 +134,13 @@ func (r *RowGroupReader) GetColumnPageReader(i int)
(PageReader, error) {
}
if r.fileDecryptor == nil {
+ stream.Free()
Review Comment:
Couldn't think of an simple way of doing it. The most robust way is
something this:
```
shouldFreeStream := true
takeStream := func(s BufferedReaderV2) BufferedReaderV2 {
shouldFreeStream = false
return s
}
```
And use `takeStream` when stream is assigned and returned and check
`shouldFreeStream` in the deferred function.
--
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]