(union: UnionArray)
| 1643 | } |
| 1644 | |
| 1645 | fn create_batch(union: UnionArray) -> RecordBatch { |
| 1646 | let schema = Schema::new(vec![Field::new( |
| 1647 | "struct_array", |
| 1648 | union.data_type().clone(), |
| 1649 | true, |
| 1650 | )]); |
| 1651 | |
| 1652 | RecordBatch::try_new(Arc::new(schema), vec![Arc::new(union)]).unwrap() |
| 1653 | } |
| 1654 | |
| 1655 | fn test_slice_union(record_batch_slice: RecordBatch) { |
| 1656 | let union_slice = record_batch_slice |