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

Function test_gc_empty_array

arrow-array/src/array/byte_view_array.rs:1391–1404  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1389 /// 1) Empty array: no elements, expect gc to return empty with no data buffers
1390 #[test]
1391 fn test_gc_empty_array() {
1392 let array = StringViewBuilder::new()
1393 .with_fixed_block_size(BLOCK_SIZE)
1394 .finish();
1395 let gced = array.gc();
1396 // length and null count remain zero
1397 assert_eq!(gced.len(), 0);
1398 assert_eq!(gced.null_count(), 0);
1399 // no underlying data buffers should be allocated
1400 assert!(
1401 gced.data_buffers().is_empty(),
1402 "Expected no data buffers for empty array"
1403 );
1404 }
1405
1406 /// 2) All inline values (<= INLINE_LEN): capacity-only data buffer, same values
1407 #[test]

Callers

nothing calls this directly

Calls 3

with_fixed_block_sizeMethod · 0.80
gcMethod · 0.80
finishMethod · 0.45

Tested by

no test coverage detected