@@ -627,6 +627,7 @@ mod tests {
627
627
use arrow_array:: { cast:: downcast_array, types:: * } ;
628
628
use arrow_buffer:: Buffer ;
629
629
use arrow_cast:: pretty:: pretty_format_batches;
630
+ use arrow_ipc:: MetadataVersion ;
630
631
use arrow_schema:: UnionMode ;
631
632
use std:: collections:: HashMap ;
632
633
@@ -638,7 +639,8 @@ mod tests {
638
639
/// ensure only the batch's used data (not the allocated data) is sent
639
640
/// <https://github.com/apache/arrow-rs/issues/208>
640
641
fn test_encode_flight_data ( ) {
641
- let options = IpcWriteOptions :: default ( ) ;
642
+ // use 8-byte alignment - default alignment is 64 which produces bigger ipc data
643
+ let options = IpcWriteOptions :: try_new ( 8 , false , MetadataVersion :: V5 ) . unwrap ( ) ;
642
644
let c1 = UInt32Array :: from ( vec ! [ 1 , 2 , 3 , 4 , 5 , 6 ] ) ;
643
645
644
646
let batch = RecordBatch :: try_from_iter ( vec ! [ ( "a" , Arc :: new( c1) as ArrayRef ) ] )
@@ -1343,6 +1345,8 @@ mod tests {
1343
1345
1344
1346
let mut stream = FlightDataEncoderBuilder :: new ( )
1345
1347
. with_max_flight_data_size ( max_flight_data_size)
1348
+ // use 8-byte alignment - default alignment is 64 which produces bigger ipc data
1349
+ . with_options ( IpcWriteOptions :: try_new ( 8 , false , MetadataVersion :: V5 ) . unwrap ( ) )
1346
1350
. build ( futures:: stream:: iter ( [ Ok ( batch. clone ( ) ) ] ) ) ;
1347
1351
1348
1352
let mut i = 0 ;
0 commit comments