awakeljw commented on a change in pull request #7972:
URL: https://github.com/apache/incubator-doris/pull/7972#discussion_r804397664
##########
File path: be/src/vec/exec/join/vhash_join_node.cpp
##########
@@ -168,46 +177,98 @@ struct ProcessHashTableProbe {
// the output block struct is same with mutable block. we can do more opt
on it and simplify
// the logic of probe
// TODO: opt the visited here to reduce the size of hash table
+ template<bool is_left_semi_join, bool is_left_anti_join, bool
is_inner_join>
Status do_process(HashTableContext& hash_table_ctx, ConstNullMapPtr
null_map,
MutableBlock& mutable_block, Block* output_block) {
using KeyGetter = typename HashTableContext::State;
using Mapped = typename HashTableContext::Mapped;
KeyGetter key_getter(_probe_raw_ptrs, _join_node->_probe_key_sz,
nullptr);
-
+
std::vector<uint32_t> items_counts(_probe_rows);
auto& mcol = mutable_block.mutable_columns();
-
- int right_col_idx = _join_node->_is_right_semi_anti ? 0 :
_left_table_data_types.size();
- int right_col_len = _right_table_data_types.size();
int current_offset = 0;
for (; _probe_index < _probe_rows;) {
- // ignore null rows
if constexpr (ignore_null) {
if ((*null_map)[_probe_index]) {
items_counts[_probe_index++] = 0;
continue;
}
}
-
int repeat_count = 0;
- auto find_result =
- (*null_map)[_probe_index]
+ if constexpr (is_inner_join) {
+ if (!(*null_map)[_probe_index]) {
+ auto find_result =
key_getter.find_key(hash_table_ctx.hash_table, _probe_index, _arena);
Review comment:
in my test ,wo found prefetch is time consumingļ¼but not helpful for
performance ,so maybe when mapped is more than 1, it is helpful.
--
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]