minyoung commented on code in PR #13068:
URL: https://github.com/apache/arrow/pull/13068#discussion_r866177642


##########
go/parquet/file/page_reader.go:
##########
@@ -611,8 +610,6 @@ func (p *serializedPageReader) Next() bool {
                        // we don't know this page type, we're allowed to skip 
non-data pages
                        continue
                }
-
-               p.buf = memory.NewResizableBuffer(p.mem)

Review Comment:
   Well, we can't simply pass the buffer as is to the page because the buffer 
itself may or may not be compressed. If the page is compressed, this function 
decompresses the page, and creates a new buffer with the decompressed data. Or 
are you proposing that we overwrite `buf` with the decompressed data in that 
case?
   
   Also, if we pass the buffer as is, is there a risk that `io.ReadFull(p.r, 
p.buf.Bytes())` will modify the data for the 'previous' page? Or should we do 
what I do now and create a new buffer for each call to `Next` (as we were doing 
previously but at the end of the function instead).



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