@@ -1578,7 +1578,7 @@ impl SortMergeJoinStream {
15781578 . append_nulls ( num_rows) ;
15791579 self . output_record_batches
15801580 . batch_ids
1581- . extend ( vec ! [ 0 ; num_rows] ) ;
1581+ . resize ( self . output_record_batches . batch_ids . len ( ) + num_rows, 0 ) ;
15821582
15831583 self . output_record_batches . batches . push ( record_batch) ;
15841584 }
@@ -1622,7 +1622,7 @@ impl SortMergeJoinStream {
16221622 . append_nulls ( num_rows) ;
16231623 self . output_record_batches
16241624 . batch_ids
1625- . extend ( vec ! [ 0 ; num_rows] ) ;
1625+ . resize ( self . output_record_batches . batch_ids . len ( ) + num_rows, 0 ) ;
16261626 self . output_record_batches . batches . push ( record_batch) ;
16271627 }
16281628 buffered_batch. join_filter_not_matched_map . clear ( ) ;
@@ -1757,10 +1757,10 @@ impl SortMergeJoinStream {
17571757 self . output_record_batches . filter_mask . extend ( pre_mask) ;
17581758 }
17591759 self . output_record_batches . row_indices . extend ( & left_indices) ;
1760- self . output_record_batches . batch_ids . extend ( vec ! [
1761- self . streamed_batch_counter . load ( Relaxed ) ;
1762- left_indices . len ( )
1763- ] ) ;
1760+ self . output_record_batches . batch_ids . resize (
1761+ self . output_record_batches . batch_ids . len ( ) + left_indices . len ( ) ,
1762+ self . streamed_batch_counter . load ( Relaxed ) ,
1763+ ) ;
17641764
17651765 // For outer joins, we need to push the null joined rows to the output if
17661766 // all joined rows are failed on the join filter.
0 commit comments