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

Function test_schema_metadata

arrow-flight/tests/encode_decode.rs:71–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

69
70#[tokio::test]
71async fn test_schema_metadata() {
72 let batch = make_primitive_batch(5);
73 let metadata = HashMap::from([("some_key".to_owned(), "some_value".to_owned())]);
74
75 // create a batch that has schema level metadata
76 let schema = Arc::new(batch.schema().as_ref().clone().with_metadata(metadata));
77 let batch = RecordBatch::try_new(schema, batch.columns().to_vec()).unwrap();
78
79 roundtrip(vec![batch]).await;
80}
81
82#[tokio::test]
83async fn test_primitive_many() {

Callers

nothing calls this directly

Calls 8

make_primitive_batchFunction · 0.85
try_newFunction · 0.85
roundtripFunction · 0.70
with_metadataMethod · 0.45
cloneMethod · 0.45
as_refMethod · 0.45
schemaMethod · 0.45
columnsMethod · 0.45

Tested by

no test coverage detected