@@ -10,6 +10,7 @@ use crate::serdes::ReferenceTables;
10
10
use crate :: storage:: table_codec:: TableCodec ;
11
11
use crate :: types:: index:: { Index , IndexId , IndexMetaRef , IndexType } ;
12
12
use crate :: types:: tuple:: { Tuple , TupleId } ;
13
+ use crate :: types:: tuple_builder:: TupleIdBuilder ;
13
14
use crate :: types:: value:: DataValue ;
14
15
use crate :: types:: { ColumnId , LogicalType } ;
15
16
use crate :: utils:: lru:: SharedLruCache ;
@@ -21,7 +22,6 @@ use std::ops::SubAssign;
21
22
use std:: sync:: Arc ;
22
23
use std:: { mem, slice} ;
23
24
use ulid:: Generator ;
24
- use crate :: types:: tuple_builder:: TupleIdBuilder ;
25
25
26
26
pub ( crate ) type StatisticsMetaCache = SharedLruCache < ( TableName , IndexId ) , StatisticsMeta > ;
27
27
pub ( crate ) type TableCache = SharedLruCache < TableName , TableCatalog > ;
@@ -657,7 +657,11 @@ impl<T: Transaction> IndexImplParams<'_, T> {
657
657
Ok ( val)
658
658
}
659
659
660
- fn get_tuple_by_id ( & self , id_builder : & mut TupleIdBuilder , tuple_id : & TupleId ) -> Result < Option < Tuple > , DatabaseError > {
660
+ fn get_tuple_by_id (
661
+ & self ,
662
+ id_builder : & mut TupleIdBuilder ,
663
+ tuple_id : & TupleId ,
664
+ ) -> Result < Option < Tuple > , DatabaseError > {
661
665
let key = TableCodec :: encode_tuple_key ( self . table_name , tuple_id) ?;
662
666
663
667
Ok ( self . tx . get ( & key) ?. map ( |bytes| {
@@ -1000,7 +1004,9 @@ impl<T: Transaction> Iter for IndexIter<'_, T> {
1000
1004
continue ;
1001
1005
}
1002
1006
Self :: limit_sub ( & mut self . limit ) ;
1003
- let tuple = self . inner . index_lookup ( & bytes, & mut self . id_builder , & self . params ) ?;
1007
+ let tuple = self
1008
+ . inner
1009
+ . index_lookup ( & bytes, & mut self . id_builder , & self . params ) ?;
1004
1010
1005
1011
return Ok ( Some ( tuple) ) ;
1006
1012
}
@@ -1063,7 +1069,10 @@ impl<T: Transaction> Iter for IndexIter<'_, T> {
1063
1069
Range :: Eq ( mut val) => {
1064
1070
val = self . params . try_cast ( val) ?;
1065
1071
1066
- match self . inner . eq_to_res ( & val, & mut self . id_builder , & self . params ) ? {
1072
+ match self
1073
+ . inner
1074
+ . eq_to_res ( & val, & mut self . id_builder , & self . params ) ?
1075
+ {
1067
1076
IndexResult :: Tuple ( tuple) => {
1068
1077
if Self :: offset_move ( & mut self . offset ) {
1069
1078
return self . next_tuple ( ) ;
0 commit comments