Repository navigation
Store plan children in fixed-position slots - #11178
Merged
Merged
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Physical plan children used to be a packed list (
PlanChildren). An absent child, such as the validity of a non-nullable struct, shifted the positions of the children after it, so lowering had to remap layout slots to plan indices for each layout kind.Plans now store children in fixed-position slots, the same way arrays and layouts already do. An absent child is a
Noneslot, so a child's position never depends on which other children are present.Changes
Slots replace children (
slots.rs, replacingchildren.rs)PlanSlotsis aSmallVec<[Option<LazyPlanRef>; 4]>newtype.LazyPlanRefis oneArcholding aOnceCell<PlanRef>and an unsizedFninitializer.with_slotsandConcat::map_chunksnever lower a child twice.