Skip to main content

PackPlan

Type Alias PackPlan 

Source
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

Source

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.

Source

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.

Source

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_plans contains exactly one child per field, in field order;
  • every field child has the corresponding field dtype and row_count rows; and
  • validity is present exactly when the struct is nullable and, when present, produces non-nullable booleans with row_count rows.
Source

pub fn fields(&self) -> &StructFields

Returns the struct fields assembled by this plan.

Source

pub fn nfields(&self) -> usize

Returns the number of struct fields, excluding any validity child.

Source

pub fn validity(&self) -> VortexResult<Option<PlanRef>>

Returns the plan producing struct validity, if the struct is nullable.

Source

pub fn field(&self, index: usize) -> VortexResult<PlanRef>

Returns the plan producing field index.