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

Function create_test_row

graphlite/src/exec/streaming_topk.rs:273–285  ·  view source on GitHub ↗
(id: usize, score: f64)

Source from the content-addressed store, hash-verified

271 use std::collections::HashMap;
272
273 fn create_test_row(id: usize, score: f64) -> Row {
274 let mut values = HashMap::new();
275 values.insert("id".to_string(), Value::Number(id as f64));
276 values.insert("score".to_string(), Value::Number(score));
277
278 Row {
279 values,
280 positional_values: vec![],
281 source_entities: HashMap::new(),
282 text_score: Some(score),
283 highlight_snippet: None,
284 }
285 }
286
287 #[test]
288 fn test_streaming_topk_basic() {

Calls 1

insertMethod · 0.45