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

Function create_union

arrow-array/src/array/union_array.rs:1636–1643  ·  view source on GitHub ↗

[1, null, 3.0, null, 4]

(mut builder: UnionBuilder)

Source from the content-addressed store, hash-verified

1634 fn slice_union_array() {
1635 // [1, null, 3.0, null, 4]
1636 fn create_union(mut builder: UnionBuilder) -> UnionArray {
1637 builder.append::<Int32Type>("a", 1).unwrap();
1638 builder.append_null::<Int32Type>("a").unwrap();
1639 builder.append::<Float64Type>("c", 3.0).unwrap();
1640 builder.append_null::<Float64Type>("c").unwrap();
1641 builder.append::<Int32Type>("a", 4).unwrap();
1642 builder.build().unwrap()
1643 }
1644
1645 fn create_batch(union: UnionArray) -> RecordBatch {
1646 let schema = Schema::new(vec![Field::new(

Callers 1

slice_union_arrayFunction · 0.85

Calls 1

buildMethod · 0.45

Tested by 1

slice_union_arrayFunction · 0.68