MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / msgpack_to_arrow_roundtrip

Function msgpack_to_arrow_roundtrip

nodedb/src/control/arrow_convert.rs:282–294  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

280
281 #[test]
282 fn msgpack_to_arrow_roundtrip() {
283 let payload = nodedb_types::json_to_msgpack(&serde_json::json!([
284 {"id": "d1", "data": {"name": "alice", "age": 30}},
285 {"id": "d2", "data": {"name": "bob", "age": 25}}
286 ]))
287 .unwrap();
288
289 let batch = msgpack_rows_to_record_batch(&payload).unwrap();
290 assert_eq!(batch.num_rows(), 2);
291 assert!(batch.schema().field_with_name("id").is_ok());
292 assert!(batch.schema().field_with_name("name").is_ok());
293 assert!(batch.schema().field_with_name("age").is_ok());
294 }
295}

Callers

nothing calls this directly

Calls 2

json_to_msgpackFunction · 0.50

Tested by

no test coverage detected