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 unsafe fn from_slots_unchecked(
fields: StructFields,
nullability: Nullability,
row_count: u64,
slots: PlanSlots,
) -> Self
pub unsafe fn from_slots_unchecked( fields: StructFields, nullability: Nullability, row_count: u64, slots: PlanSlots, ) -> Self
Creates a struct assembly from potentially unbuilt slots without validation.
§Safety
slots must hold a validity slot followed by one slot per field. The validity slot must
be present exactly when nullability is nullable and produce non-nullable booleans. Every
field slot must be present with its field dtype, and every child must have row_count
rows.
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.
Sourcepub fn field(&self, index: usize) -> VortexResult<PlanRef>
pub fn field(&self, index: usize) -> VortexResult<PlanRef>
Returns the plan producing field index.