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

Function test_decoder_all_data

parquet/src/arrow/push_decoder/mod.rs:901–922  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

899 /// available in memory
900 #[test]
901 fn test_decoder_all_data() {
902 let mut decoder = ParquetPushDecoderBuilder::try_new_decoder(test_file_parquet_metadata())
903 .unwrap()
904 .build()
905 .unwrap();
906
907 decoder
908 .push_range(test_file_range(), TEST_FILE_DATA.clone())
909 .unwrap();
910
911 let results = vec![
912 // first row group should be decoded without needing more data
913 expect_data(decoder.try_decode()),
914 // second row group should be decoded without needing more data
915 expect_data(decoder.try_decode()),
916 ];
917 expect_finished(decoder.try_decode());
918
919 let all_output = concat_batches(&TEST_BATCH.schema(), &results).unwrap();
920 // Check that the output matches the input batch
921 assert_eq!(all_output, *TEST_BATCH);
922 }
923
924 /// Decode the entire file incrementally, simulating a scenario where data is
925 /// fetched as needed

Callers

nothing calls this directly

Calls 9

test_file_rangeFunction · 0.70
expect_finishedFunction · 0.70
concat_batchesFunction · 0.50
buildMethod · 0.45
push_rangeMethod · 0.45
cloneMethod · 0.45
try_decodeMethod · 0.45
schemaMethod · 0.45

Tested by

no test coverage detected