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

Function single_partition

nodedb/src/control/trigger/batch/partition.rs:141–154  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

139
140 #[test]
141 fn single_partition() {
142 let rows = vec![
143 row_with_field("r1", "type", "order"),
144 row_with_field("r2", "type", "order"),
145 ];
146
147 match partition_by_field(&rows, "type", 32) {
148 PartitionResult::Partitions(parts) => {
149 assert_eq!(parts.len(), 1);
150 assert_eq!(parts[0].row_indices.len(), 2);
151 }
152 PartitionResult::CircuitBroken { .. } => panic!("unexpected circuit break"),
153 }
154 }
155
156 #[test]
157 fn null_field_partitions_together() {

Callers

nothing calls this directly

Calls 1

partition_by_fieldFunction · 0.85

Tested by

no test coverage detected