File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
lib/query-plan-executor/src Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -519,8 +519,12 @@ impl ExecutablePlanNode for ParallelNode {
519
519
}
520
520
}
521
521
// We collect indexes in paths (replacing "@") to mutate the final result later
522
- // This is not a case for SequenceNode only for ParallelNode
523
- // Because in ParallelNode, we can't hold the mutable references
522
+ // It might look similar to `FlattenNode.execute` which is called within `SequenceNode`
523
+ // But it is not because in `SequenceNode`, we collect mutable references and mutate them during sequence execution.
524
+ // While here, we collect the indexes in paths to get the mutable reference after the execution.
525
+ // Collecting mutable references during traversal is possible in sequential execution which is more optimal than the following,
526
+ // but in parallel execution, we need to collect indexes in paths to mutate the final result later.
527
+ // We don't apply the following logic to the sequential execution, because the one there is more optimal.
524
528
let mut indexes_in_paths: Vec < VecDeque < usize > > = vec ! [ ] ;
525
529
traverse_and_callback (
526
530
data,
You can’t perform that action at this time.
0 commit comments