File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -444,16 +444,20 @@ impl DataScopeBuilder {
444444 schema : CollectorSchema ,
445445 ) -> Result < AnalyzedLocalCollectorReference > {
446446 let mut collectors = self . collectors . lock ( ) . unwrap ( ) ;
447- let collector_idx = collectors. len ( ) as u32 ;
448- match collectors. entry ( collector_name) {
447+ let existing_len = collectors. len ( ) ;
448+ let idx = match collectors. entry ( collector_name) {
449449 indexmap:: map:: Entry :: Occupied ( mut entry) => {
450450 entry. get_mut ( ) . merge_schema ( & schema) ?;
451+ entry. index ( )
451452 }
452453 indexmap:: map:: Entry :: Vacant ( entry) => {
453454 entry. insert ( CollectorBuilder :: new ( Arc :: new ( schema) ) ) ;
455+ existing_len
454456 }
455- }
456- Ok ( AnalyzedLocalCollectorReference { collector_idx } )
457+ } ;
458+ Ok ( AnalyzedLocalCollectorReference {
459+ collector_idx : idx as u32 ,
460+ } )
457461 }
458462
459463 pub fn into_data_schema ( self ) -> Result < DataSchema > {
You can’t perform that action at this time.
0 commit comments