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

Function test_dictionary_resend

arrow-flight/src/encode.rs:880–894  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

878
879 #[tokio::test]
880 async fn test_dictionary_resend() {
881 let arr1: DictionaryArray<UInt16Type> = vec!["a", "a", "b"].into_iter().collect();
882 let arr2: DictionaryArray<UInt16Type> = vec!["c", "c", "d"].into_iter().collect();
883
884 let schema = Arc::new(Schema::new(vec![Field::new_dictionary(
885 "dict",
886 DataType::UInt16,
887 DataType::Utf8,
888 false,
889 )]));
890 let batch1 = RecordBatch::try_new(schema.clone(), vec![Arc::new(arr1)]).unwrap();
891 let batch2 = RecordBatch::try_new(schema, vec![Arc::new(arr2)]).unwrap();
892
893 verify_flight_round_trip(vec![batch1, batch2]).await;
894 }
895
896 #[tokio::test]
897 async fn test_dictionary_hydration_known_schema() {

Callers

nothing calls this directly

Calls 5

try_newFunction · 0.85
verify_flight_round_tripFunction · 0.85
collectMethod · 0.80
into_iterMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected