File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
lib/query-plan-executor/src Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -518,6 +518,9 @@ impl ExecutablePlanNode for ParallelNode {
518
518
number_of_indexes += 1 ;
519
519
}
520
520
}
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
521
524
let mut indexes_in_paths: Vec < VecDeque < usize > > = vec ! [ ] ;
522
525
traverse_and_callback (
523
526
data,
@@ -551,7 +554,10 @@ impl ExecutablePlanNode for ParallelNode {
551
554
None ,
552
555
)
553
556
}
554
- . unwrap_or ( false ) ;
557
+ . unwrap_or_else ( |e| {
558
+ warn ! ( "Error while projecting representations for FetchNode: {:?} {}" , fetch_node, e) ;
559
+ false
560
+ } ) ;
555
561
if is_projected {
556
562
indexes_in_paths. push ( indexes_in_path) ;
557
563
}
@@ -593,6 +599,10 @@ impl ExecutablePlanNode for ParallelNode {
593
599
}
594
600
}
595
601
ParallelJob :: Flatten ( mut result, path) => {
602
+ /*
603
+ * We iterate over the returned entities,
604
+ * and merge them into the final response based on the path segments collected
605
+ **/
596
606
if let Some ( entities) = result. entities {
597
607
' entity_loop: for ( entity, indexes_in_path) in
598
608
entities. into_iter ( ) . zip ( result. indexes_in_paths . iter_mut ( ) )
You can’t perform that action at this time.
0 commit comments