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

Function roundtrip_dictionary

arrow-flight/tests/encode_decode.rs:431–438  ·  view source on GitHub ↗

Encodes input as a FlightData stream, and then decodes it using FlightRecordBatchStream and validates the decoded record batches match the expected input. When is resolved, it should be possible to use `roundtrip`

(input: Vec<RecordBatch>)

Source from the content-addressed store, hash-verified

429/// When <https://github.com/apache/arrow-rs/issues/3389> is resolved,
430/// it should be possible to use `roundtrip`
431async fn roundtrip_dictionary(input: Vec<RecordBatch>) {
432 let schema = Arc::new(prepare_schema_for_flight(input[0].schema_ref()));
433 let expected_output: Vec<_> = input
434 .iter()
435 .map(|batch| prepare_batch_for_flight(batch, schema.clone()).unwrap())
436 .collect();
437 roundtrip_with_encoder(FlightDataEncoderBuilder::default(), input, expected_output).await
438}
439
440async fn roundtrip_with_encoder(
441 encoder: FlightDataEncoderBuilder,

Callers 2

test_dictionary_oneFunction · 0.85
test_dictionary_manyFunction · 0.85

Calls 8

prepare_batch_for_flightFunction · 0.85
roundtrip_with_encoderFunction · 0.85
defaultFunction · 0.85
schema_refMethod · 0.80
collectMethod · 0.80
iterMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected