File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
pipeline/sources/src/input_formats Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -330,8 +330,11 @@ impl StringColumnBuilder {
330330 let bytes_per_row = self . data . len ( ) / 64 + 1 ;
331331 let bytes_estimate = bytes_per_row * self . offsets . capacity ( ) ;
332332
333+ const MAX_HINT_SIZE : usize = 1000000000 ;
333334 // if we are more than 10% over the capacity, we reserve more
334- if bytes_estimate as f64 > self . data . capacity ( ) as f64 * 1.10f64 {
335+ if bytes_estimate < MAX_HINT_SIZE
336+ && bytes_estimate as f64 > self . data . capacity ( ) as f64 * 1.10f64
337+ {
335338 self . data . reserve ( bytes_estimate - self . data . capacity ( ) ) ;
336339 }
337340 }
Original file line number Diff line number Diff line change @@ -463,10 +463,7 @@ impl<T: InputFormatTextBase> BlockBuilder<T> {
463463 . mutable_columns
464464 . iter_mut ( )
465465 . map ( |col| {
466- let empty_builder = ColumnBuilder :: with_capacity (
467- & col. data_type ( ) ,
468- self . ctx . block_compact_thresholds . min_rows_per_block ,
469- ) ;
466+ let empty_builder = ColumnBuilder :: with_capacity ( & col. data_type ( ) , 0 ) ;
470467 std:: mem:: replace ( col, empty_builder) . build ( )
471468 } )
472469 . collect ( ) ;
You can’t perform that action at this time.
0 commit comments