daniel-adam-tfs commented on code in PR #547:
URL: https://github.com/apache/arrow-go/pull/547#discussion_r2469332720
##########
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:
I'm not sure if this is needed or not. But for data page v2, the data is
just read by ReadFull and Decrypt is not called:
https://github.com/apache/arrow-go/blob/95b3f76a5c82529784402ff992c511fe9998ec6f/parquet/file/page_reader.go#L815-L824
So maybe the Decrypt call is not needed for data age v1 or dictionary page
either?
--
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]