Skip to content

Commit 98193e2

Browse files
committed
fmt
1 parent c54c4c3 commit 98193e2

5 files changed

Lines changed: 3 additions & 40 deletions

File tree

crates/lance-graph/src/datafusion_planner/builder/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ impl DataFusionPlanner {
3838
label,
3939
properties,
4040
..
41-
} => self.build_scan(variable, label, properties),
41+
} => self.build_scan(ctx, variable, label, properties),
4242
LogicalOperator::Filter { input, predicate } => {
4343
self.build_filter(ctx, input, predicate)
4444
}

crates/lance-graph/src/datafusion_planner/expression.rs

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,6 @@ use datafusion_functions_aggregate::min_max::max;
1919
use datafusion_functions_aggregate::min_max::min;
2020
use datafusion_functions_aggregate::sum::sum;
2121

22-
/// Helper function to convert serde_json::Value to DataFusion ScalarValue
23-
fn json_to_scalar(value: &serde_json::Value) -> datafusion::scalar::ScalarValue {
24-
use datafusion::scalar::ScalarValue;
25-
match value {
26-
serde_json::Value::Null => ScalarValue::Null,
27-
serde_json::Value::Bool(b) => ScalarValue::Boolean(Some(*b)),
28-
serde_json::Value::Number(n) => {
29-
if let Some(i) = n.as_i64() {
30-
ScalarValue::Int64(Some(i))
31-
} else if let Some(f) = n.as_f64() {
32-
ScalarValue::Float64(Some(f))
33-
} else {
34-
ScalarValue::Null
35-
}
36-
}
37-
serde_json::Value::String(s) => ScalarValue::Utf8(Some(s.clone())),
38-
serde_json::Value::Array(_) | serde_json::Value::Object(_) => ScalarValue::Null, // Complex types not supported yet
39-
}
40-
}
41-
4222
/// Helper function to create LIKE expressions with consistent settings
4323
fn create_like_expr(expression: &ValueExpression, pattern: &str, case_insensitive: bool) -> Expr {
4424
Expr::Like(datafusion::logical_expr::Like {
@@ -78,7 +58,7 @@ pub(crate) fn to_df_boolean_expr(expr: &BooleanExpression) -> Expr {
7858
BE::In { expression, list } => {
7959
use datafusion::logical_expr::expr::InList as DFInList;
8060
let expr = to_df_value_expr(expression);
81-
let list_exprs = list.iter().map(|e| to_df_value_expr(e)).collect::<Vec<_>>();
61+
let list_exprs = list.iter().map(to_df_value_expr).collect::<Vec<_>>();
8262
Expr::InList(DFInList::new(Box::new(expr), list_exprs, false))
8363
}
8464
BE::And(l, r) => Expr::BinaryExpr(BinaryExpr {

crates/lance-graph/src/datafusion_planner/scan_ops.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ impl DataFusionPlanner {
2121
/// Build a qualified node scan with property filters and column aliasing
2222
pub(crate) fn build_scan(
2323
&self,
24+
_ctx: &PlanningContext,
2425
variable: &str,
2526
label: &str,
2627
properties: &HashMap<String, PropertyValue>,

crates/lance-graph/src/parser.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1747,21 +1747,6 @@ mod tests {
17471747
let query = "MATCH (p:Person) WHERE p.age > $min_age RETURN p";
17481748
let result = parse_cypher_query(query);
17491749
assert!(result.is_ok(), "$param should parse successfully");
1750-
1751-
// Test @param (should fail)
1752-
let query = "MATCH (p:Person) WHERE p.age > @min_age RETURN p";
1753-
let result = parse_cypher_query(query);
1754-
assert!(result.is_err(), "@param should fail");
1755-
1756-
// Test :param (should fail)
1757-
let query = "MATCH (p:Person) WHERE p.age > :min_age RETURN p";
1758-
let result = parse_cypher_query(query);
1759-
assert!(result.is_err(), ":param should fail");
1760-
1761-
// Test {param} (should fail)
1762-
let query = "MATCH (p:Person) WHERE p.age > {min_age} RETURN p";
1763-
let result = parse_cypher_query(query);
1764-
assert!(result.is_err(), "{{param}} should fail");
17651750
}
17661751

17671752
#[test]

python/python/tests/test_cypher_engine.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,3 @@ def test_cypher_engine_config_access(graph_env):
166166

167167
assert "person" in engine_config.node_labels() # case-insensitive
168168
assert "company" in engine_config.node_labels()
169-
170-
171-

0 commit comments

Comments
 (0)