Skip to content

Commit 87a19c4

Browse files
committed
docs: clarify purpose of plain_encoded_size
Explain why it's OK to panic in the implementation for bool.
1 parent 1827d04 commit 87a19c4

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

parquet/src/data_type.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,10 @@ pub(crate) mod private {
725725
fn skip(decoder: &mut PlainDecoderDetails, num_values: usize) -> Result<usize>;
726726

727727
/// Return the size in bytes for the value encoded in the plain encoding.
728+
///
729+
/// This method is only used with the dictionary encoding. Since the writer
730+
/// does not use the dictionary encoding for BOOLEAN type, this method's
731+
/// implementation for bool will panic if called.
728732
fn plain_encoded_size(&self) -> usize;
729733

730734
/// Return the number of variable length bytes in a given slice of data

0 commit comments

Comments
 (0)