joechenrh commented on code in PR #937:
URL: https://github.com/apache/arrow-go/pull/937#discussion_r3580869483


##########
parquet/internal/encoding/streaming/value_buffer.go:
##########
@@ -151,12 +153,23 @@ func (s *streamBuffer) Recycle() {
                s.mem.Free(b)
        }
        s.live = s.live[:0]
-       // Rewind the primary chunk; swap out an oversized one so steady state 
stays small.
-       if len(s.cur) != s.chunkSize {
+       // Compact once the consumed prefix passes half the chunk, so 
read-ahead keeps room
+       // without a rotate (peak = one chunk) and the copy stays rare.

Review Comment:
   Updated in 
https://github.com/joechenrh/arrow-go/commit/80b7fe3debd89d9f8229822c49eebb33324e1cc7
 . Reworded the comment to describe the compaction/rotation tradeoff without 
implying a hard one-chunk ceiling. Thanks for catching that!



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