HappenLee commented on code in PR #24044:
URL: https://github.com/apache/doris/pull/24044#discussion_r1318423485
##########
be/src/vec/exec/vset_operation_node.cpp:
##########
@@ -682,47 +682,41 @@ void
VSetOperationNode<is_intersect>::refresh_hash_table() {
HashTableCtxType tmp_hash_table;
bool is_need_shrink =
arg.hash_table.should_be_shrink(_valid_element_in_hash_tbl);
- if (is_need_shrink) {
+ if (is_intersect || is_need_shrink) {
tmp_hash_table.hash_table.init_buf_size(
_valid_element_in_hash_tbl /
arg.hash_table.get_factor() + 1);
}
arg.init_once();
auto& iter = arg.iter;
auto iter_end = arg.hash_table.end();
- while (iter != iter_end) {
- auto& mapped = iter->get_second();
- auto it = mapped.begin();
-
- if constexpr (is_intersect) { //intersected
- if (it->visited) {
- it->visited = false;
- if (is_need_shrink) {
-
tmp_hash_table.hash_table.insert(iter->get_value());
+ std::visit(
+ [&](auto is_need_shrink_const) {
+ while (iter != iter_end) {
+ auto& mapped = iter->get_second();
+ auto it = mapped.begin();
+
+ if constexpr (is_intersect) {
//intersected
+ if (it->visited) {
+ it->visited = false;
Review Comment:
no need to the work
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]