sunchao commented on a change in pull request #443: URL: https://github.com/apache/arrow-rs/pull/443#discussion_r651247944
########## File path: parquet/src/data_type.rs ########## @@ -661,8 +661,15 @@ pub(crate) mod private { _: &mut W, bit_writer: &mut BitWriter, ) -> Result<()> { + if bit_writer.bytes_written() + values.len() >= bit_writer.capacity() { Review comment: Hmm I'm sorry but can you elaborate why the unit of `values` is also byte? -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org