zeroshade commented on code in PR #43616:
URL: https://github.com/apache/arrow/pull/43616#discussion_r1709973497


##########
go/parquet/internal/utils/bit_packing_avx2_amd64.go:
##########
@@ -45,6 +45,10 @@ func unpack32Avx2(in io.Reader, out []uint32, nbits int) int 
{
        buffer.Grow(n)
        io.CopyN(buffer, in, int64(n))
 
+       if buffer.Len() == 0 {
+               return 0
+       }

Review Comment:
   given the way the code is written, `buffer.Len()` should always end up being 
equal to `n` because we call `buffer.Reset()` and `buffer.Grow(n)` so I think 
we should make this change.



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