()
| 494 | |
| 495 | #[test] |
| 496 | fn test_stream_round_trip() { |
| 497 | let array = Int32Array::from(vec![Some(2), None, Some(1), None]); |
| 498 | let array: Arc<dyn Array> = Arc::new(array); |
| 499 | let metadata = HashMap::from([("foo".to_owned(), "bar".to_owned())]); |
| 500 | |
| 501 | let schema = Arc::new(Schema::new_with_metadata( |
| 502 | vec![ |
| 503 | Field::new("a", array.data_type().clone(), true).with_metadata(metadata.clone()), |
| 504 | Field::new("b", array.data_type().clone(), true).with_metadata(metadata.clone()), |
| 505 | Field::new("c", array.data_type().clone(), true).with_metadata(metadata.clone()), |
| 506 | ], |
| 507 | metadata, |
| 508 | )); |
| 509 | let batch = RecordBatch::try_new(schema.clone(), vec![array.clone(), array.clone(), array]) |
| 510 | .unwrap(); |
| 511 | |
| 512 | _test_round_trip_export(batch.clone(), schema.clone()).unwrap(); |
| 513 | _test_round_trip_import(batch, schema).unwrap(); |
| 514 | } |
| 515 | |
| 516 | #[test] |
| 517 | fn test_stream_round_trip_no_columns() { |
nothing calls this directly
no test coverage detected