Skip to content

Commit 0f3a8ab

Browse files
committed
Add test
1 parent 80b6c2b commit 0f3a8ab

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arrow-select/src/coalesce.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,7 @@ mod tests {
615615
use crate::concat::concat_batches;
616616
use arrow_array::builder::StringViewBuilder;
617617
use arrow_array::cast::AsArray;
618+
use arrow_array::types::Int32Type;
618619
use arrow_array::{
619620
BinaryViewArray, Int32Array, Int64Array, RecordBatchOptions, StringArray, StringViewArray,
620621
TimestampNanosecondArray, UInt32Array, UInt64Array,
@@ -1625,6 +1626,8 @@ mod tests {
16251626
// Now should have a completed batch (100 rows total)
16261627
assert!(coalescer.has_completed_batch());
16271628
let output_batch = coalescer.next_completed_batch().unwrap();
1629+
let size = output_batch.column(0).as_primitive::<Int32Type>().get_buffer_memory_size();
1630+
assert_eq!(size, 400); // 100 rows * 4 bytes each
16281631
assert_eq!(output_batch.num_rows(), 100);
16291632

16301633
assert_eq!(coalescer.get_buffered_rows(), 0);

0 commit comments

Comments
 (0)