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

Function outer_join_propagates_null

nodedb-array/src/query/elementwise.rs:197–209  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

195
196 #[test]
197 fn outer_join_propagates_null() {
198 let s = schema();
199 let a = tile(&[(0, 1)]);
200 let b = tile(&[(1, 2)]);
201 let out = elementwise(&s, &a, &b, BinaryOp::Add).unwrap();
202 assert_eq!(out.nnz(), 2);
203 // Both rows are missing one operand → both become Null+something
204 // → passthrough gives the present operand.
205 let v0 = &out.attr_cols[0][0];
206 let v1 = &out.attr_cols[0][1];
207 assert!(matches!(v0, CellValue::Int64(1) | CellValue::Int64(2)));
208 assert!(matches!(v1, CellValue::Int64(1) | CellValue::Int64(2)));
209 }
210
211 #[test]
212 fn div_by_zero_returns_null() {

Callers

nothing calls this directly

Calls 3

elementwiseFunction · 0.85
schemaFunction · 0.70
tileFunction · 0.70

Tested by

no test coverage detected