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

Function expect_data

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

Expect that the [`DecodeResult`] is a [`DecodeResult::Data`] and return the corresponding element

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

Source from the content-addressed store, hash-verified

2142
2143 /// Expect that the [`DecodeResult`] is a [`DecodeResult::Data`] and return the corresponding element
2144 fn expect_data<T: Debug>(result: Result<DecodeResult<T>, ParquetError>) -> T {
2145 match result.expect("Expected Ok(DecodeResult::Data(T))") {
2146 DecodeResult::Data(data) => data,
2147 result => panic!("Expected DecodeResult::Data, got {result:?}"),
2148 }
2149 }
2150
2151 /// Expect that the [`DecodeResult`] is a [`DecodeResult::NeedsData`] and return the corresponding ranges
2152 fn expect_needs_data<T: Debug>(

Calls

no outgoing calls