()
| 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 |
nothing calls this directly
no test coverage detected