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

Method convert_to_positional_rows

graphlite/src/exec/executor.rs:7605–7623  ·  view source on GitHub ↗

Convert rows to positional format for set operations

(&self, rows: Vec<Row>, variables: &[String])

Source from the content-addressed store, hash-verified

7603
7604 /// Convert rows to positional format for set operations
7605 fn convert_to_positional_rows(&self, rows: Vec<Row>, variables: &[String]) -> Vec<Row> {
7606 rows.into_iter()
7607 .map(|row| {
7608 let mut positional_values = Vec::new();
7609
7610 // Extract values in variable order for positional comparison
7611 for var_name in variables {
7612 if let Some(value) = row.values.get(var_name) {
7613 positional_values.push(value.clone());
7614 } else {
7615 // If variable not found, use null (shouldn't happen in well-formed queries)
7616 positional_values.push(Value::Null);
7617 }
7618 }
7619
7620 Row::from_positional(positional_values, variables)
7621 })
7622 .collect()
7623 }
7624
7625 /// Convert rows to positional format, mapping by position rather than by name
7626 /// Used for set operations where column names may differ but positions must align

Callers 3

execute_unionMethod · 0.80
execute_intersectMethod · 0.80
execute_exceptMethod · 0.80

Calls 2

cloneMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected