Try move local vars
@@ -77,6 +77,11 @@ where
group_cols: Vec<String>,
mut stream: SendableDataBlockStream,
) -> Result<RwLock<(HashMap<Method::HashKey, usize>, Bump)>> {
+ let groups_locker = RwLock::new((HashMap::<Method::HashKey, usize>::create(), Bump::new()));
+
+ while let Some(block) = stream.next().await {
+ let block = block?;
+
let hash_method = &self.method;
let aggregator_params = self.params.as_ref();
@@ -88,10 +93,6 @@ where
let layout = self.layout;
let offsets_aggregate_states = &self.offsets_aggregate_states;
- let groups_locker = RwLock::new((HashMap::<Method::HashKey, usize>::create(), Bump::new()));
-
- while let Some(block) = stream.next().await {
- let block = block?;
// 1.1 and 1.2.
let mut group_columns = Vec::with_capacity(group_cols.len());
{
