@@ -639,11 +639,10 @@ void AggSinkLocalState::_emplace_into_hash_table_inline_count(ColumnRawPtrs& key
639639 auto creator_for_null_key = [&](auto & mapped) { mapped = nullptr ; };
640640
641641 SCOPED_TIMER (_hash_table_emplace_timer);
642- for (size_t i = 0 ; i < num_rows; ++i) {
643- auto * mapped_ptr = agg_method.lazy_emplace (state, i, creator,
644- creator_for_null_key);
645- ++reinterpret_cast <UInt64&>(*mapped_ptr);
646- }
642+ lazy_emplace_batch (agg_method, state, num_rows, creator,
643+ creator_for_null_key, [&](uint32_t , auto & mapped) {
644+ ++reinterpret_cast <UInt64&>(mapped);
645+ });
647646
648647 COUNTER_UPDATE (_hash_table_input_counter, num_rows);
649648 }},
@@ -680,11 +679,11 @@ void AggSinkLocalState::_merge_into_hash_table_inline_count(ColumnRawPtrs& key_c
680679 auto creator_for_null_key = [&](auto & mapped) { mapped = nullptr ; };
681680
682681 SCOPED_TIMER (_hash_table_emplace_timer);
683- for ( size_t i = 0 ; i < num_rows; ++i) {
684- auto * mapped_ptr = agg_method. lazy_emplace ( state, i , creator,
685- creator_for_null_key);
686- reinterpret_cast <UInt64&>(*mapped_ptr ) += col_data[i].count ;
687- }
682+ lazy_emplace_batch (
683+ agg_method, state, num_rows , creator, creator_for_null_key ,
684+ [&]( uint32_t i, auto & mapped) {
685+ reinterpret_cast <UInt64&>(mapped ) += col_data[i].count ;
686+ });
688687
689688 COUNTER_UPDATE (_hash_table_input_counter, num_rows);
690689 }},
0 commit comments