hcrosse opened a new pull request, #1546:
URL: https://github.com/apache/arrow-go/pull/1546

   ### Rationale for this change
   
   This follows #1545. `PlainBooleanEncoder` and the delta encoders have no 
`Reset` of their own, so the next flush writes state from before `Reset`. Plain 
booleans then decode to the wrong values. The delta value count includes 
dropped values, so decoding fails with errors such as `invalid delta value 
count 205 for 5 buffered values`.
   
   ### What changes are included in this PR?
   
   New `Reset` methods for `PlainBooleanEncoder`, the delta binary packed 
encoders, `DeltaLengthByteArrayEncoder` and `DeltaByteArrayEncoder` clear the 
state that their `FlushValues` methods clear.
   
   ### Are these changes tested?
   
   `TestEncoderResetDropsBufferedValues` replaces 
`TestRleBooleanEncoderResetDropsBufferedValues`, covering these four encoders 
and RLE booleans. It checks that values before `Reset` stay discarded, 
`Bytes()` is empty, and an immediate flush matches a fresh encoder's empty 
flush. Every row except RLE fails on main and passes with this change.
   
   With Go 1.26.10, vet, encoding package race tests, full `go test -race -tags 
assert,test ./parquet/...` with pinned `arrow-testing` and `parquet-testing`, 
`golangci-lint` 2.13.2 and the Release Audit Tool passed.
   
   ### Are there any user-facing changes?
   
   No. The encoders are internal, and only tests call their `Reset`. There is 
no API 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