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

Function expect_needs_data

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

Expect that the [`DecodeResult`] is a [`DecodeResult::NeedsData`] and return the corresponding ranges

(
        result: Result<DecodeResult<T>, ParquetError>,
    )

Source from the content-addressed store, hash-verified

2150
2151 /// Expect that the [`DecodeResult`] is a [`DecodeResult::NeedsData`] and return the corresponding ranges
2152 fn expect_needs_data<T: Debug>(
2153 result: Result<DecodeResult<T>, ParquetError>,
2154 ) -> Vec<Range<u64>> {
2155 match result.expect("Expected Ok(DecodeResult::NeedsData{ranges})") {
2156 DecodeResult::NeedsData(ranges) => ranges,
2157 result => panic!("Expected DecodeResult::NeedsData, got {result:?}"),
2158 }
2159 }
2160
2161 fn expect_finished<T: Debug>(result: Result<DecodeResult<T>, ParquetError>) {
2162 match result.expect("Expected Ok(DecodeResult::Finished)") {

Calls

no outgoing calls