From 56ec2bfdabb050b565191984194b5b9658b03620 Mon Sep 17 00:00:00 2001 From: Richard Chien Date: Wed, 22 Feb 2023 16:27:35 +0800 Subject: [PATCH] better naming Signed-off-by: Richard Chien --- src/stream/src/executor/aggregation/distinct.rs | 2 +- src/stream/src/executor/global_simple_agg.rs | 4 ++-- src/stream/src/executor/hash_agg.rs | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/stream/src/executor/aggregation/distinct.rs b/src/stream/src/executor/aggregation/distinct.rs index 7550bb0524689..924f6ce0f225c 100644 --- a/src/stream/src/executor/aggregation/distinct.rs +++ b/src/stream/src/executor/aggregation/distinct.rs @@ -201,7 +201,7 @@ impl DistinctDeduplicater { Self { deduplicaters } } - pub fn get_dedup_caches(&mut self) -> impl Iterator { + pub fn dedup_caches_mut(&mut self) -> impl Iterator { self.deduplicaters .values_mut() .map(|(_, deduplicater)| &mut deduplicater.cache) diff --git a/src/stream/src/executor/global_simple_agg.rs b/src/stream/src/executor/global_simple_agg.rs index 2e58d4c0c611a..eb8835f5d75ee 100644 --- a/src/stream/src/executor/global_simple_agg.rs +++ b/src/stream/src/executor/global_simple_agg.rs @@ -308,7 +308,7 @@ impl GlobalSimpleAggExecutor { state_changed: false, }; - vars.distinct_dedup.get_dedup_caches().for_each(|cache| { + vars.distinct_dedup.dedup_caches_mut().for_each(|cache| { cache.update_epoch(barrier.epoch.curr); }); @@ -340,7 +340,7 @@ impl GlobalSimpleAggExecutor { { yield Message::Chunk(chunk); } - vars.distinct_dedup.get_dedup_caches().for_each(|cache| { + vars.distinct_dedup.dedup_caches_mut().for_each(|cache| { cache.update_epoch(barrier.epoch.curr); }); yield Message::Barrier(barrier); diff --git a/src/stream/src/executor/hash_agg.rs b/src/stream/src/executor/hash_agg.rs index e98e09637e2ba..2bb586abfba41 100644 --- a/src/stream/src/executor/hash_agg.rs +++ b/src/stream/src/executor/hash_agg.rs @@ -558,7 +558,7 @@ impl HashAggExecutor { }); this.result_table.init_epoch(barrier.epoch); vars.agg_group_cache.update_epoch(barrier.epoch.curr); - vars.distinct_dedup.get_dedup_caches().for_each(|cache| { + vars.distinct_dedup.dedup_caches_mut().for_each(|cache| { cache.update_epoch(barrier.epoch.curr); }); @@ -604,7 +604,7 @@ impl HashAggExecutor { // Manipulate the cache if necessary. if cache_may_stale(&previous_vnode_bitmap, &vnode_bitmap) { vars.agg_group_cache.clear(); - vars.distinct_dedup.get_dedup_caches().for_each(|cache| { + vars.distinct_dedup.dedup_caches_mut().for_each(|cache| { cache.clear(); }); } @@ -612,7 +612,7 @@ impl HashAggExecutor { // Update the current epoch. vars.agg_group_cache.update_epoch(barrier.epoch.curr); - vars.distinct_dedup.get_dedup_caches().for_each(|cache| { + vars.distinct_dedup.dedup_caches_mut().for_each(|cache| { cache.update_epoch(barrier.epoch.curr); });