File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -201,20 +201,15 @@ impl<const N: usize> MutableBuffer<N> {
201
201
fn push ( & mut self , rb : & RecordBatch ) -> Option < Vec < RecordBatch > > {
202
202
if self . inner . len ( ) + rb. num_rows ( ) >= N {
203
203
let left = N - self . inner . len ( ) ;
204
- let right = rb. num_rows ( ) - left;
205
204
let left_slice = rb. slice ( 0 , left) ;
206
- let right_slice = if left < rb. num_rows ( ) {
207
- Some ( rb. slice ( left, right) )
208
- } else {
209
- None
210
- } ;
211
205
self . inner . push ( left_slice) ;
212
206
// take all records
213
207
let src = Vec :: with_capacity ( self . inner . len ( ) ) ;
214
208
let inner = std:: mem:: replace ( & mut self . inner , src) ;
215
209
216
- if let Some ( right_slice) = right_slice {
217
- self . inner . push ( right_slice) ;
210
+ if left < rb. num_rows ( ) {
211
+ let right = rb. num_rows ( ) - left;
212
+ self . inner . push ( rb. slice ( left, right) ) ;
218
213
}
219
214
220
215
Some ( inner)
You can’t perform that action at this time.
0 commit comments