You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/10/19 10:54:08 UTC

[GitHub] [doris] Gabriel39 commented on a diff in pull request #13479: [fix](hashjoin) fix coredump of hash join in ubsan build

Gabriel39 commented on code in PR #13479:
URL: https://github.com/apache/doris/pull/13479#discussion_r999280166


##########
be/src/vec/exec/join/vhash_join_node.cpp:
##########
@@ -268,8 +271,8 @@ void ProcessHashTableProbe<JoinOpType, ignore_null>::build_side_output_column(
 
     // Dispose right tuple is null flags columns
     if constexpr (probe_all && !have_other_join_conjunct) {
-        _tuple_is_null_right_flags.resize(size);
-        auto* __restrict null_data = _tuple_is_null_right_flags.data();
+        _tuple_is_null_right_flags->resize(size);

Review Comment:
   DCHECK(_tuple_is_null_right_flags)



##########
be/src/vec/exec/join/vhash_join_node.cpp:
##########
@@ -192,16 +192,19 @@ ProcessHashTableProbe<JoinOpType, ignore_null>::ProcessHashTableProbe(HashJoinNo
         : _join_node(join_node),
           _batch_size(batch_size),
           _build_blocks(join_node->_build_blocks),
-          _tuple_is_null_left_flags(
-                  reinterpret_cast<ColumnUInt8&>(*join_node->_tuple_is_null_left_flag_column)
-                          .get_data()),
-          _tuple_is_null_right_flags(
-                  reinterpret_cast<ColumnUInt8&>(*join_node->_tuple_is_null_right_flag_column)
-                          .get_data()),
           _rows_returned_counter(join_node->_rows_returned_counter),
           _search_hashtable_timer(join_node->_search_hashtable_timer),
           _build_side_output_timer(join_node->_build_side_output_timer),
-          _probe_side_output_timer(join_node->_probe_side_output_timer) {}
+          _probe_side_output_timer(join_node->_probe_side_output_timer) {

Review Comment:
   Prefer to `_tuple_is_null_left_flags(join_node->_is_outer_join?reinterpret_cast<ColumnUInt8&>(*join_node->_tuple_is_null_left_flag_column)
                             .get_data():nullptr)`



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org