You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "pitrou (via GitHub)" <gi...@apache.org> on 2026/10/06 08:53:57 UTC

Re: [PR] GH-50314: [C++][Parquet] Reject invalid DELTA_BINARY_PACKED headers [arrow]

pitrou commented on PR #51128:
URL: https://github.com/apache/arrow/pull/51128#issuecomment-6012815079

   Sorry for the delay here. I don't like the proposed approach because it starts decoding a block in `InitHeader`. This makes the code more complicated and brittle.
   
   I think we can do simpler. We know that each miniblock requires at least one byte for its bitwidth.
   So the check can look like:
   ```c++
       const int64_t required_blocks = CeilDiv(total_value_count_ - 1, values_per_block_);
       if (required_blocks * mini_blocks_per_block > decoder_->bytes_left()) { /* throw exception */ }
   ```
   


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