(
batch: &RecordBatch,
options: &IpcWriteOptions,
)
| 1808 | } |
| 1809 | |
| 1810 | fn flight_data_from_arrow_batch( |
| 1811 | batch: &RecordBatch, |
| 1812 | options: &IpcWriteOptions, |
| 1813 | ) -> (Vec<FlightData>, FlightData) { |
| 1814 | let data_gen = IpcDataGenerator::default(); |
| 1815 | let mut dictionary_tracker = DictionaryTracker::new(false); |
| 1816 | let mut compression_context = CompressionContext::default(); |
| 1817 | |
| 1818 | let (encoded_dictionaries, encoded_batch) = data_gen |
| 1819 | .encode( |
| 1820 | batch, |
| 1821 | &mut dictionary_tracker, |
| 1822 | options, |
| 1823 | &mut compression_context, |
| 1824 | ) |
| 1825 | .expect("DictionaryTracker configured above to not error on replacement"); |
| 1826 | |
| 1827 | let flight_dictionaries = encoded_dictionaries.into_iter().map(Into::into).collect(); |
| 1828 | let flight_batch = encoded_batch.into(); |
| 1829 | |
| 1830 | (flight_dictionaries, flight_batch) |
| 1831 | } |
| 1832 | |
| 1833 | #[test] |
| 1834 | fn test_split_batch_for_grpc_response() { |
no test coverage detected