File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
common/native/src/compression/binary
query/service/src/spillers Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -60,9 +60,9 @@ pub fn compress_binary(
6060 offsets. clone ( )
6161 } else {
6262 let first = offsets. first ( ) . unwrap ( ) ;
63- let mut zero_offsets = Vec :: with_capacity ( offsets. len ( ) ) ;
64- for offset in offsets. iter ( ) {
65- zero_offsets. push ( * offset - * first) ;
63+ let mut zero_offsets = vec ! [ 0_u64 ; offsets. len( ) ] ;
64+ for ( idx , offset) in offsets. iter ( ) . enumerate ( ) {
65+ zero_offsets[ idx ] = * offset - * first;
6666 }
6767 zero_offsets. into ( )
6868 } ;
Original file line number Diff line number Diff line change 1313// limitations under the License.
1414
1515use std:: collections:: VecDeque ;
16+ use std:: mem:: size_of;
1617
1718use byteorder:: BigEndian ;
1819use byteorder:: ReadBytesExt ;
You can’t perform that action at this time.
0 commit comments