MCPcopy Create free account
hub / github.com/apache/arrow-rs / try_decode

Method try_decode

parquet/src/arrow/push_decoder/mod.rs:418–423  ·  view source on GitHub ↗

Attempt to decode the next batch of data, or return what data is needed The the decoder communicates the next state with a [`DecodeResult`] See full example in [`ParquetPushDecoderBuilder`] ```no_run # use parquet::arrow::push_decoder::ParquetPushDecoder; use parquet::DecodeResult; # fn get_decoder() -> ParquetPushDecoder { unimplemented!() } # fn push_data(decoder: &mut ParquetPushDecoder, ran

(&mut self)

Source from the content-addressed store, hash-verified

416 /// }
417 ///```
418 pub fn try_decode(&mut self) -> Result<DecodeResult<RecordBatch>, ParquetError> {
419 let current_state = std::mem::replace(&mut self.state, ParquetDecoderState::Finished);
420 let (new_state, decode_result) = current_state.try_next_batch()?;
421 self.state = new_state;
422 Ok(decode_result)
423 }
424
425 /// Return a [`ParquetRecordBatchReader`] that reads the next set of rows, or
426 /// return what data is needed to produce it.

Calls 1

try_next_batchMethod · 0.80