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

Function test_in_progress_recreation

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

Source from the content-addressed store, hash-verified

1271
1272 #[test]
1273 fn test_in_progress_recreation() {
1274 let array = {
1275 // make a builder with small block size.
1276 let mut builder = StringViewBuilder::new().with_fixed_block_size(14);
1277 builder.append_value("large payload over 12 bytes");
1278 builder.append_option(Some("another large payload over 12 bytes that double than the first one, so that we can trigger the in_progress in builder re-created"));
1279 builder.finish()
1280 };
1281 assert_eq!(array.value(0), "large payload over 12 bytes");
1282 assert_eq!(
1283 array.value(1),
1284 "another large payload over 12 bytes that double than the first one, so that we can trigger the in_progress in builder re-created"
1285 );
1286 assert_eq!(2, array.buffers.len());
1287 }
1288
1289 #[test]
1290 #[should_panic(expected = "Invalid buffer index at 0: got index 3 but only has 1 buffers")]

Callers

nothing calls this directly

Calls 4

with_fixed_block_sizeMethod · 0.80
append_valueMethod · 0.45
append_optionMethod · 0.45
finishMethod · 0.45

Tested by

no test coverage detected