MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / dim_dict_dedups_repeated_values

Function dim_dict_dedups_repeated_values

nodedb-array/src/tile/sparse_tile.rs:378–395  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

376
377 #[test]
378 fn dim_dict_dedups_repeated_values() {
379 let s = schema();
380 let mut b = SparseTileBuilder::new(&s);
381 b.push(
382 &[CoordValue::Int64(1), CoordValue::Int64(100)],
383 &[CellValue::String("ALT".into()), CellValue::Float64(40.0)],
384 )
385 .unwrap();
386 b.push(
387 &[CoordValue::Int64(1), CoordValue::Int64(200)],
388 &[CellValue::String("REF".into()), CellValue::Float64(50.0)],
389 )
390 .unwrap();
391 let t = b.build();
392 // chrom dictionary should have one entry (1 repeated).
393 assert_eq!(t.dim_dicts[0].cardinality(), 1);
394 assert_eq!(t.dim_dicts[0].len(), 2);
395 }
396
397 #[test]
398 fn sparse_tile_rejects_bad_arity() {

Callers

nothing calls this directly

Calls 3

schemaFunction · 0.70
pushMethod · 0.45
buildMethod · 0.45

Tested by

no test coverage detected