This is an automated email from the ASF dual-hosted git repository. panxiaolei pushed a commit to branch ckb_preview in repository https://gitbox.apache.org/repos/asf/doris.git
commit 57ce96bbf0a1da4c963eb94ac4eec72107d75298 Author: BiteTheDDDDt <[email protected]> AuthorDate: Tue Mar 3 21:05:01 2026 +0800 update --- be/src/vec/common/hash_table/hash_map_context.h | 16 +++++++++------- be/src/vec/common/hash_table/string_hash_table.h | 9 --------- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/be/src/vec/common/hash_table/hash_map_context.h b/be/src/vec/common/hash_table/hash_map_context.h index f4cfaa229ca..3cfa14f76c2 100644 --- a/be/src/vec/common/hash_table/hash_map_context.h +++ b/be/src/vec/common/hash_table/hash_map_context.h @@ -503,19 +503,20 @@ void process_submap_emplace(Submap& submap, const uint32_t* indices, size_t coun continue; } } - const auto& origin = agg_method.keys[row]; + auto origin = agg_method.keys[row]; auto converted_key = convert_key_for_submap<GroupIdx>(origin); typename Submap::LookupResult result; if constexpr (GroupIdx == 0 || GroupIdx == 5) { // Groups 0,5: key and origin are the same StringRef submap.lazy_emplace_with_origin(converted_key, converted_key, result, hash_for_group<GroupIdx>(agg_method.hash_values, row), - std::forward<F>(creator)); + creator); } else { - // Groups 1-4: converted_key differs from origin + // Groups 1-4: converted_key differs from origin; origin must be + // a non-const copy so try_presis_key_and_origin can persist it submap.lazy_emplace_with_origin(converted_key, origin, result, hash_for_group<GroupIdx>(agg_method.hash_values, row), - std::forward<F>(creator)); + creator); } result_handler(row, result->get_second()); } @@ -547,17 +548,18 @@ void process_submap_emplace_void(Submap& submap, const uint32_t* indices, size_t continue; } } - const auto& origin = agg_method.keys[row]; + auto origin = agg_method.keys[row]; auto converted_key = convert_key_for_submap<GroupIdx>(origin); typename Submap::LookupResult result; if constexpr (GroupIdx == 0 || GroupIdx == 5) { submap.lazy_emplace_with_origin(converted_key, converted_key, result, hash_for_group<GroupIdx>(agg_method.hash_values, row), - std::forward<F>(creator)); + creator); } else { + // origin must be a non-const copy so try_presis_key_and_origin can persist it submap.lazy_emplace_with_origin(converted_key, origin, result, hash_for_group<GroupIdx>(agg_method.hash_values, row), - std::forward<F>(creator)); + creator); } } } diff --git a/be/src/vec/common/hash_table/string_hash_table.h b/be/src/vec/common/hash_table/string_hash_table.h index cdd0b0b8d79..03265e22828 100644 --- a/be/src/vec/common/hash_table/string_hash_table.h +++ b/be/src/vec/common/hash_table/string_hash_table.h @@ -673,15 +673,6 @@ public: const_iterator cend() const { return end(); } iterator end() { return iterator(this, true); } - /// Public accessors for sub-tables, enabling direct batch operations - /// that bypass dispatch() for better performance (no per-row branching). - T0& get_submap_m0() { return m0; } - T1& get_submap_m1() { return m1; } - T2& get_submap_m2() { return m2; } - T3& get_submap_m3() { return m3; } - T4& get_submap_m4() { return m4; } - Ts& get_submap_ms() { return ms; } - /// Visit each (group_index, submap) pair with a generic callable. /// Func signature: func(std::integral_constant<int, GroupIdx>, Submap&) /// The integral_constant enables compile-time group dispatch in the lambda. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
