MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / extract_variables_from_plan

Method extract_variables_from_plan

graphlite/src/exec/executor.rs:9270–9282  ·  view source on GitHub ↗

Extract variable names from physical plan, falling back to first row if needed

(&self, node: &PhysicalNode, rows: &[Row])

Source from the content-addressed store, hash-verified

9268
9269 /// Extract variable names from physical plan, falling back to first row if needed
9270 fn extract_variables_from_plan(&self, node: &PhysicalNode, rows: &[Row]) -> Vec<String> {
9271 // Try to extract variables from the physical plan structure
9272 if let Some(variables) = self.extract_variables_from_node(node) {
9273 return variables;
9274 }
9275
9276 // Fallback to extracting from the first row (original behavior)
9277 if let Some(first_row) = rows.first() {
9278 first_row.values.keys().cloned().collect()
9279 } else {
9280 Vec::new()
9281 }
9282 }
9283
9284 /// Extract variables from a physical node (returns None if not a projection node)
9285 fn extract_variables_from_node(&self, node: &PhysicalNode) -> Option<Vec<String>> {

Calls 2

firstMethod · 0.45

Tested by

no test coverage detected