Skip to content

Commit 551e107

Browse files
committed
update: removed test_vector_index_state_equality and test_vector_state_serialisation since they're testing standard Rust derive macros
1 parent 1102bb8 commit 551e107

File tree

1 file changed

+0
-54
lines changed

1 file changed

+0
-54
lines changed

src/ops/targets/kuzu.rs

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,60 +1404,6 @@ mod tests {
14041404
);
14051405
}
14061406

1407-
#[test]
1408-
fn test_vector_index_state_equality() {
1409-
let state1 = VectorIndexState {
1410-
field_name: "embedding".to_string(),
1411-
metric: VectorSimilarityMetric::CosineSimilarity,
1412-
method: Some(VectorIndexMethod::Hnsw {
1413-
m: Some(16),
1414-
ef_construction: Some(200),
1415-
}),
1416-
};
1417-
1418-
let state2 = VectorIndexState {
1419-
field_name: "embedding".to_string(),
1420-
metric: VectorSimilarityMetric::CosineSimilarity,
1421-
method: Some(VectorIndexMethod::Hnsw {
1422-
m: Some(16),
1423-
ef_construction: Some(200),
1424-
}),
1425-
};
1426-
1427-
let state3 = VectorIndexState {
1428-
field_name: "embedding".to_string(),
1429-
metric: VectorSimilarityMetric::L2Distance, // Different metric
1430-
method: Some(VectorIndexMethod::Hnsw {
1431-
m: Some(16),
1432-
ef_construction: Some(200),
1433-
}),
1434-
};
1435-
1436-
assert_eq!(state1, state2);
1437-
assert_ne!(state1, state3);
1438-
}
1439-
1440-
#[test]
1441-
fn test_vector_index_state_serialization() {
1442-
let state = VectorIndexState {
1443-
field_name: "embedding".to_string(),
1444-
metric: VectorSimilarityMetric::CosineSimilarity,
1445-
method: Some(VectorIndexMethod::Hnsw {
1446-
m: Some(16),
1447-
ef_construction: Some(200),
1448-
}),
1449-
};
1450-
1451-
// Test serialization
1452-
let serialized = serde_json::to_string(&state).unwrap();
1453-
assert!(serialized.contains("embedding"));
1454-
assert!(serialized.contains("CosineSimilarity"));
1455-
1456-
// Test deserialization
1457-
let deserialized: VectorIndexState = serde_json::from_str(&serialized).unwrap();
1458-
assert_eq!(state, deserialized);
1459-
}
1460-
14611407
#[test]
14621408
fn test_parameter_mapping_edge_cases() {
14631409
// Test with only m parameter

0 commit comments

Comments
 (0)