pub type PackPlan = Plan<Pack>;Expand description
A plan that assembles a struct from its children.
Aliased Type§
pub struct PackPlan { /* private fields */ }Implementations§
Source§impl PackPlan
impl PackPlan
Sourcepub fn try_new(
fields: StructFields,
nullability: Nullability,
row_count: u64,
field_plans: Vec<PlanRef>,
validity: Option<PlanRef>,
) -> VortexResult<Self>
pub fn try_new( fields: StructFields, nullability: Nullability, row_count: u64, field_plans: Vec<PlanRef>, validity: Option<PlanRef>, ) -> VortexResult<Self>
Creates a struct assembly from fields and one child per field.
Each field child must have the corresponding field dtype and row_count rows. validity
is required exactly when nullability is Nullability::Nullable and must produce
non-nullable booleans with row_count rows.
Sourcepub unsafe fn new_unchecked(
fields: StructFields,
nullability: Nullability,
row_count: u64,
field_plans: Vec<PlanRef>,
validity: Option<PlanRef>,
) -> Self
pub unsafe fn new_unchecked( fields: StructFields, nullability: Nullability, row_count: u64, field_plans: Vec<PlanRef>, validity: Option<PlanRef>, ) -> Self
Creates a struct assembly without validating its children.
§Safety
The caller must ensure that:
field_planscontains exactly one child per field, in field order;- every field child has the corresponding field dtype and
row_countrows; and validityis present exactly when the struct is nullable and, when present, produces non-nullable booleans withrow_countrows.
Sourcepub fn fields(&self) -> &StructFields
pub fn fields(&self) -> &StructFields
Returns the struct fields assembled by this plan.
Sourcepub fn nfields(&self) -> usize
pub fn nfields(&self) -> usize
Returns the number of struct fields, excluding any validity child.
Sourcepub fn validity(&self) -> VortexResult<Option<PlanRef>>
pub fn validity(&self) -> VortexResult<Option<PlanRef>>
Returns the plan producing struct validity, if the struct is nullable.