fallintoplace opened a new issue, #949:
URL: https://github.com/apache/arrow-go/issues/949

   ### Describe the enhancement requested
   
   `parquet/compress.Codec` currently exposes block decompression as:
   
   ```go
   Decode(dst, src []byte) []byte
   ```
   
   There is no error channel, so the built-in codecs panic when compressed 
input is malformed. The Parquet page reader invokes these codecs with bytes 
read from a file, which means a corrupt page can escape as a process panic 
instead of a normal read error.
   
   `StreamingCodec.NewReader` has a similar constraint: it cannot report 
initialization failures directly. The interfaces are public and `RegisterCodec` 
explicitly supports third-party implementations, so changing them requires a 
compatibility plan.
   
   ### Design questions
   
   - Add a new error-returning interface and adapt legacy codecs, or change 
`Codec` in the next compatible major version.
   - Decide how registered custom codecs migrate.
   - Decide whether streaming reader creation should also return an error.
   - Keep panic recovery, if any, inside one compatibility adapter rather than 
page-reader call sites.
   
   ### Desired outcome
   
   - Malformed Snappy, Gzip, Brotli, Zstd, and LZ4 input returns a contextual 
Parquet read error.
   - File-reader codec calls do not expose codec panics.
   - Custom codec compatibility and migration are documented.
   - Fuzz coverage includes empty, truncated, bit-flipped, and trailing input 
for every registered codec.
   
   Observed on current `main` at `750586710988bc18f7af64fd29af8e0acdb252ac`.
   
   ### Component(s)
   
   Parquet


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