You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "mslevine (via GitHub)" <gi...@apache.org> on 2023/05/23 04:31:53 UTC

[GitHub] [arrow] mslevine commented on issue #35718: [Go] [Parquet] panic writing with DeltaBinaryPacked when column only has nulls

mslevine commented on issue #35718:
URL: https://github.com/apache/arrow/issues/35718#issuecomment-1558504595

   Reading more code, it seems possible the fix could be as simple as
   ```
   diff --git a/go/parquet/internal/encoding/delta_bit_packing.go b/go/parquet/internal/encoding/delta_bit_packing.go
   index 2ebe6ad98..d68044a07 100644
   --- a/go/parquet/internal/encoding/delta_bit_packing.go
   +++ b/go/parquet/internal/encoding/delta_bit_packing.go
   @@ -458,7 +458,11 @@ func (enc *deltaBitPackEncoder) FlushValues() (Buffer, error) {
    
    // EstimatedDataEncodedSize returns the current amount of data actually flushed out and written
    func (enc *deltaBitPackEncoder) EstimatedDataEncodedSize() int64 {
   -       return int64(enc.bitWriter.Written())
   +       if enc.bitWriter != nil {
   +               return int64(enc.bitWriter.Written())
   +       } else {
   +               return 0
   +       }
    }
    
    // DeltaBitPackInt32Encoder is an encoder for the delta bitpacking encoding for int32 data.
   ```
   
   (although I could easily believe that the correct response when nil is some constant other than 0)


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org