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