File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -120,8 +120,7 @@ pub fn open_column_bytes(
120120 ) ;
121121 let ( dictionary_bytes, column_bytes) = body. split ( dictionary_len as usize ) ;
122122
123- let dictionary_bytes = dictionary_bytes. read_bytes ( ) ?;
124- let dictionary = Arc :: new ( Dictionary :: from_bytes ( dictionary_bytes) ?) ;
123+ let dictionary = Arc :: new ( Dictionary :: open ( dictionary_bytes) ?) ;
125124 let term_ord_column = crate :: column:: open_column_u64 :: < u64 > ( column_bytes, format_version) ?;
126125 Ok ( BytesColumn {
127126 dictionary,
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ impl Dictionary<VoidSSTable> {
5555 dictionary_writer. insert ( term, & ( ) ) . unwrap ( ) ;
5656 }
5757 dictionary_writer. finish ( ) . unwrap ( ) ;
58- Dictionary :: from_bytes ( OwnedBytes :: new ( buffer) ) . unwrap ( )
58+ Dictionary :: from_bytes_for_tests ( OwnedBytes :: new ( buffer) ) . unwrap ( )
5959 }
6060}
6161
@@ -322,7 +322,7 @@ impl<TSSTable: SSTable> Dictionary<TSSTable> {
322322 }
323323
324324 /// Creates a term dictionary from the supplied bytes.
325- pub fn from_bytes ( owned_bytes : OwnedBytes ) -> io:: Result < Self > {
325+ pub fn from_bytes_for_tests ( owned_bytes : OwnedBytes ) -> io:: Result < Self > {
326326 Dictionary :: open ( FileSlice :: new ( Arc :: new ( owned_bytes) ) )
327327 }
328328
Original file line number Diff line number Diff line change @@ -307,7 +307,7 @@ mod tests {
307307 dict_builder. insert ( b"abandon" , & 3 ) ?;
308308 let buffer = dict_builder. finish ( ) ?;
309309 let owned_bytes = OwnedBytes :: new ( buffer) ;
310- Dictionary :: from_bytes ( owned_bytes)
310+ Dictionary :: from_bytes_for_tests ( owned_bytes)
311311 }
312312
313313 #[ test]
You can’t perform that action at this time.
0 commit comments