Trait parquet::encoding::Encoder [−][src]
pub trait Encoder<T: DataType> { fn put(&mut self, values: &[T::T]) -> Result<()>; fn encoding(&self) -> Encoding; fn flush_buffer(&mut self) -> Result<ByteBufferPtr>; }
An Parquet encoder for the data type T.
Currently this allocates internal buffers for the encoded values. After done putting
values, caller should call flush_buffer() to get an immutable buffer pointer.
Required Methods
fn put(&mut self, values: &[T::T]) -> Result<()>
Encodes data from values.
fn encoding(&self) -> Encoding
Returns the encoding type of this encoder.
fn flush_buffer(&mut self) -> Result<ByteBufferPtr>
Flushes the underlying byte buffer that's being processed by this encoder, and return the immutable copy of it. This will also reset the internal state.
Implementors
impl<T: DataType> Encoder<T> for PlainEncoder<T>impl Encoder<BoolType> for PlainEncoder<BoolType>impl Encoder<Int96Type> for PlainEncoder<Int96Type>impl Encoder<ByteArrayType> for PlainEncoder<ByteArrayType>impl Encoder<FixedLenByteArrayType> for PlainEncoder<FixedLenByteArrayType>impl<T: DataType> Encoder<T> for DictEncoder<T>impl<T: DataType> Encoder<T> for RleValueEncoder<T>impl Encoder<BoolType> for RleValueEncoder<BoolType>impl<T: DataType> Encoder<T> for DeltaBitPackEncoder<T>impl<T: DataType> Encoder<T> for DeltaLengthByteArrayEncoder<T>impl Encoder<ByteArrayType> for DeltaLengthByteArrayEncoder<ByteArrayType>impl<T: DataType> Encoder<T> for DeltaByteArrayEncoder<T>impl Encoder<ByteArrayType> for DeltaByteArrayEncoder<ByteArrayType>