pub fn structure(children: Vec<(&str, ArrayRef)>) -> Result<ArrayRef>Expand description
A non-nullable Struct column from named child columns.
The field types are taken from the columns themselves, so a caller cannot declare one shape and pass another.
§Errors
DataError when the children disagree on length, or when
there are no children at all (a struct’s row count would be unknowable).
§Examples
use astrs_node_api::message::build;
let column = build::structure(vec![
("x", build::primitive::<f64>(&[1.0])),
("y", build::primitive::<f64>(&[2.0])),
])?;
assert_eq!(column.len(), 1);