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 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.