We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7188477 commit 6f0ae5bCopy full SHA for 6f0ae5b
src/query/pipeline/core/src/pipeline.rs
@@ -144,16 +144,18 @@ impl Pipeline {
144
return self;
145
}
146
147
+ let root_scope = root_scope.unwrap();
148
+
149
for node in self.graph.node_weights_mut() {
150
let Some(scope) = node.scope.as_mut() else {
- node.scope = root_scope.clone();
151
+ node.scope = Some(root_scope.clone());
152
continue;
153
};
154
- if scope.parent_id.is_none() {
155
+ if scope.parent_id.is_none() && scope.id != root_scope.id {
156
unsafe {
157
let scope = Arc::get_mut_unchecked(scope);
- scope.parent_id = root_scope.as_ref().map(|x| x.id);
158
+ scope.parent_id = Some(root_scope.id);
159
160
161
0 commit comments