Skip to content

Commit c15f622

Browse files
yuou leiyuou lei
authored andcommitted
fmt
1 parent b8d0832 commit c15f622

File tree

2 files changed

+14
-18
lines changed

2 files changed

+14
-18
lines changed

rust/lance-graph/src/ast.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,9 @@ pub enum BooleanExpression {
224224
pattern: String,
225225
},
226226
/// IS NULL pattern matching
227-
IsNull (ValueExpression),
227+
IsNull(ValueExpression),
228228
/// IS NOT NULL pattern matching
229-
IsNotNull (ValueExpression),
229+
IsNotNull(ValueExpression),
230230
}
231231

232232
/// Comparison operators

rust/lance-graph/src/parser.rs

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -868,15 +868,13 @@ mod tests {
868868
let where_clause = result.where_clause.expect("Expected WHERE clause");
869869

870870
match where_clause.expression {
871-
BooleanExpression::IsNull(expr) => {
872-
match expr {
873-
ValueExpression::Property(prop_ref) => {
874-
assert_eq!(prop_ref.variable, "n");
875-
assert_eq!(prop_ref.property, "age");
876-
}
877-
_ => panic!("Expected property reference in IS NULL expression"),
871+
BooleanExpression::IsNull(expr) => match expr {
872+
ValueExpression::Property(prop_ref) => {
873+
assert_eq!(prop_ref.variable, "n");
874+
assert_eq!(prop_ref.property, "age");
878875
}
879-
}
876+
_ => panic!("Expected property reference in IS NULL expression"),
877+
},
880878
other => panic!("Expected IS NULL expression, got {:?}", other),
881879
}
882880
}
@@ -888,15 +886,13 @@ mod tests {
888886
let where_clause = result.where_clause.expect("Expected WHERE clause");
889887

890888
match where_clause.expression {
891-
BooleanExpression::IsNotNull(expr) => {
892-
match expr {
893-
ValueExpression::Property(prop_ref) => {
894-
assert_eq!(prop_ref.variable, "n");
895-
assert_eq!(prop_ref.property, "age");
896-
}
897-
_ => panic!("Expected property reference in IS NOT NULL expression"),
889+
BooleanExpression::IsNotNull(expr) => match expr {
890+
ValueExpression::Property(prop_ref) => {
891+
assert_eq!(prop_ref.variable, "n");
892+
assert_eq!(prop_ref.property, "age");
898893
}
899-
}
894+
_ => panic!("Expected property reference in IS NOT NULL expression"),
895+
},
900896
other => panic!("Expected IS NOT NULL expression, got {:?}", other),
901897
}
902898
}

0 commit comments

Comments
 (0)