tom-eon opened a new pull request, #1273:
URL: https://github.com/apache/arrow-go/pull/1273

   ### Rationale for this change
   
   `byteStreamSplitEncoder.Release` unconditionally passes `enc.flushBuffer` to 
`releaseBufferToPool`, which dereferences it. The flush buffer is allocated 
lazily on the first `FlushValues`, so releasing an encoder that never flushed — 
which `columnWriter.Close` does for a column chunk that received no values — 
dereferences nil and crashes the process with a SIGSEGV. 
`ByteStreamSplitFixedLenByteArrayEncoder.Release` has the same defect.
   
   ### What changes are included in this PR?
   
   A nil guard at the top of `releaseBufferToPool`, covering both encoders, 
plus a regression test that releases a never-flushed BYTE_STREAM_SPLIT encoder 
for all five physical types (INT32, INT64, FLOAT, DOUBLE, FIXED_LEN_BYTE_ARRAY).
   
   ### Are these changes tested?
   
   Yes. The new test panics on every subtest without the fix and passes with 
it; the existing `parquet/internal/encoding` and `parquet/file` suites pass.
   
   ### Are there any user-facing changes?
   
   No API changes. Writing a parquet file with a BYTE_STREAM_SPLIT column no 
longer panics when a column chunk ends up empty (e.g. an empty trailing row 
group).


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