You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This Epic is for tracking the migration from LayoutReader to Plan to new system similar to how Arrays split out reducing and execution). This epic will focus on Plan optimisation (another epic will focus on the need compute and I/O and maybe subtasks). This Plan could be seen as a usual database physical plan.
We currently have a LayoutReader which operates on expressions using filter_evaluation, projection_evaluation etc. These are given an expression which they pass split up and pass into children LayoutReader. A Plan will act similarly to ArrayRef in that optimisations will rewrite one Plan into another.
Why
Currently there are a few problems with LayoutReader (some with execution, omitted here) and other with optimization.
Its currently hard to understand that a LayoutReader actually executes for a specific split (its internal to a stack frame) and the expression splitting is merged with execution.
Optimisations for an expression must be computed (with a cache) for each access to a split.
Its currently hard to modify the LayoutReader with modify the backing Layout (if I want to gate loading a file based on a pruning layout then I need to modify the layout tree when I should only need to modify the Plan).
What
A Plan will be a data structure with children [Plans], and segment, like how Arrays have children and buffers.
A plan will be created from a Layout augmented with other Plans optimised and then executed (this will be refined later).
Example
Lets say we have a Layout
StructLayout(a: FlatLayout, b: FlatLayout) and we want to apply the expr $.a + 1 the struct layout reader would be passed that expr partition the expression request $+1 from the a: FlatLayout and return it.
This Epic is for tracking the migration from
LayoutReadertoPlanto new system similar to howArrays split out reducing and execution). This epic will focus onPlanoptimisation (another epic will focus on the need compute and I/O and maybe subtasks). ThisPlancould be seen as a usual database physical plan.We currently have a
LayoutReaderwhich operates on expressions usingfilter_evaluation,projection_evaluationetc. These are given an expression which they pass split up and pass into children LayoutReader. APlanwill act similarly toArrayRefin that optimisations will rewrite onePlaninto another.Why
Currently there are a few problems with
LayoutReader(some with execution, omitted here) and other with optimization.LayoutReaderactually executes for a specific split (its internal to a stack frame) and the expression splitting is merged with execution.LayoutReaderwith modify the backingLayout(if I want to gate loading a file based on a pruning layout then I need to modify the layout tree when I should only need to modify thePlan).What
A
Planwill be a data structure with children [Plans], and segment, like howArrays have children and buffers.A plan will be created from a
Layoutaugmented with otherPlans optimised and then executed (this will be refined later).Example
Lets say we have a
LayoutStructLayout(a: FlatLayout, b: FlatLayout)and we want to apply the expr$.a + 1the struct layout reader would be passed that expr partition the expression request$+1from the a: FlatLayout and return it.In the
Plansystem we would createwhich would be optimised to
pwould then be evaluated using some out of scope execution system. (For now we will use theLayoutReadersystem we have in vortex)Status
PlantraitExpressionPlanTracking Issue: ExpressionPlan #9115Goal
Motivation
Unresolved questions