@@ -17,7 +17,7 @@ pub struct Function {
1717 pub merge : MergeFn ,
1818 pub ( crate ) nodes : table:: Table ,
1919 sorts : HashSet < Symbol > ,
20- pub ( crate ) indexes : Vec < Rc < ColumnIndex > > ,
20+ pub ( crate ) indexes : Vec < Arc < ColumnIndex > > ,
2121 pub ( crate ) rebuild_indexes : Vec < Option < CompositeColumnIndex > > ,
2222 index_updated_through : usize ,
2323 updates : usize ,
@@ -30,7 +30,7 @@ pub enum MergeFn {
3030 Union ,
3131 // the rc is make sure it's cheaply clonable, since calling the merge fn
3232 // requires a clone
33- Expr ( Rc < Program > ) ,
33+ Expr ( Arc < Program > ) ,
3434}
3535
3636/// All information we know determined by the input.
@@ -125,7 +125,7 @@ impl Function {
125125 let program = egraph
126126 . compile_expr ( & binding, & actions, & target)
127127 . map_err ( Error :: TypeErrors ) ?;
128- MergeFn :: Expr ( Rc :: new ( program) )
128+ MergeFn :: Expr ( Arc :: new ( program) )
129129 } else if decl. subtype == FunctionSubtype :: Constructor {
130130 MergeFn :: Union
131131 } else {
@@ -136,7 +136,7 @@ impl Function {
136136 input
137137 . iter ( )
138138 . chain ( once ( & output) )
139- . map ( |x| Rc :: new ( ColumnIndex :: new ( x. name ( ) ) ) ) ,
139+ . map ( |x| Arc :: new ( ColumnIndex :: new ( x. name ( ) ) ) ) ,
140140 ) ;
141141
142142 let rebuild_indexes = Vec :: from_iter ( input. iter ( ) . chain ( once ( & output) ) . map ( |x| {
@@ -179,7 +179,7 @@ impl Function {
179179 self . nodes . clear ( ) ;
180180 self . indexes
181181 . iter_mut ( )
182- . for_each ( |x| Rc :: make_mut ( x) . clear ( ) ) ;
182+ . for_each ( |x| Arc :: make_mut ( x) . clear ( ) ) ;
183183 self . rebuild_indexes . iter_mut ( ) . for_each ( |x| {
184184 if let Some ( x) = x {
185185 x. clear ( )
@@ -219,7 +219,7 @@ impl Function {
219219 & self ,
220220 col : usize ,
221221 timestamps : & Range < u32 > ,
222- ) -> Option < Rc < ColumnIndex > > {
222+ ) -> Option < Arc < ColumnIndex > > {
223223 let range = self . nodes . transform_range ( timestamps) ;
224224 if range. end > self . index_updated_through {
225225 return None ;
@@ -250,7 +250,7 @@ impl Function {
250250 . zip ( self . rebuild_indexes . iter_mut ( ) )
251251 . enumerate ( )
252252 {
253- let as_mut = Rc :: make_mut ( index) ;
253+ let as_mut = Arc :: make_mut ( index) ;
254254 if col == self . schema . input . len ( ) {
255255 for ( slot, _, out) in self . nodes . iter_range ( offsets. clone ( ) , true ) {
256256 as_mut. add ( out. value , slot)
@@ -295,7 +295,7 @@ impl Function {
295295 for index in & mut self . indexes {
296296 // Everything works if we don't have a unique copy of the indexes,
297297 // but we ought to be able to avoid this copy.
298- Rc :: make_mut ( index) . clear ( ) ;
298+ Arc :: make_mut ( index) . clear ( ) ;
299299 }
300300 for rebuild_index in self . rebuild_indexes . iter_mut ( ) . flatten ( ) {
301301 rebuild_index. clear ( ) ;
0 commit comments