zeroshade commented on code in PR #547:
URL: https://github.com/apache/arrow-go/pull/547#discussion_r2470448308


##########
parquet/file/page_reader.go:
##########
@@ -500,14 +508,31 @@ func (p *serializedPageReader) Page() Page {
        return p.curPage
 }
 
+func (p *serializedPageReader) readUncompressed(rd io.Reader, lenUncompressed 
int, buf []byte) ([]byte, error) {
+       n, err := io.ReadFull(rd, buf[:lenUncompressed])
+       if err != nil {
+               return nil, err
+       }
+       if n != lenUncompressed {
+               return nil, fmt.Errorf("parquet: expected to read %d bytes but 
only read %d", lenUncompressed, n)
+       }
+       if p.cryptoCtx.DataDecryptor != nil {

Review Comment:
   The reverse actually. Looks like this is a bug we just never came across, 
I'm guessing no one was using DataPageV2 with uncompressed data but still 
encrypted that was using this library.
   
   



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