MCPcopy Create free account
hub / github.com/apache/arrow-rs / test_struct_equal_slice

Function test_struct_equal_slice

arrow/tests/array_equal.rs:1375–1397  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1373
1374#[test]
1375fn test_struct_equal_slice() {
1376 let a = make_struct(vec![
1377 None,
1378 Some((Some("joe"), Some(1))),
1379 Some((None, Some(2))),
1380 Some((None, None)),
1381 Some((Some("mark"), Some(4))),
1382 Some((Some("doe"), Some(5))),
1383 ]);
1384 let a = a.slice(1, 5);
1385 let a = a.as_any().downcast_ref::<StructArray>().unwrap();
1386
1387 let b = make_struct(vec![
1388 Some((Some("joe"), Some(1))),
1389 Some((None, Some(2))),
1390 Some((None, None)),
1391 Some((Some("mark"), Some(4))),
1392 Some((Some("doe"), Some(5))),
1393 ]);
1394 assert_eq!(a, &b);
1395
1396 test_equal(&a, &b, true);
1397}
1398
1399#[test]
1400fn test_list_excess_children_equal() {

Callers

nothing calls this directly

Calls 4

make_structFunction · 0.85
test_equalFunction · 0.85
sliceMethod · 0.45
as_anyMethod · 0.45

Tested by

no test coverage detected