This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 6c70d794f6 [fix](bitmapfilter) fix core dump caused by bitmap filter (#14702) 6c70d794f6 is described below commit 6c70d794f6e23bef866622ba351cda77676eda5c Author: luozenglin <37725793+luozeng...@users.noreply.github.com> AuthorDate: Thu Dec 1 09:56:22 2022 +0800 [fix](bitmapfilter) fix core dump caused by bitmap filter (#14702) --- be/src/vec/exec/join/vnested_loop_join_node.cpp | 5 +++-- regression-test/data/query_p0/join/test_bitmap_filter.out | 8 ++++++++ regression-test/suites/query_p0/join/test_bitmap_filter.groovy | 2 ++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/be/src/vec/exec/join/vnested_loop_join_node.cpp b/be/src/vec/exec/join/vnested_loop_join_node.cpp index 246122d5df..2d3a954903 100644 --- a/be/src/vec/exec/join/vnested_loop_join_node.cpp +++ b/be/src/vec/exec/join/vnested_loop_join_node.cpp @@ -187,6 +187,7 @@ Status VNestedLoopJoinNode::_materialize_build_side(RuntimeState* state) { Status VNestedLoopJoinNode::get_left_side(RuntimeState* state, Block* block) { do { + release_block_memory(*block); RETURN_IF_ERROR_AND_CHECK_SPAN( child(0)->get_next_after_projects(state, block, &_left_side_eos), child(0)->get_next_span(), _left_side_eos); @@ -208,7 +209,8 @@ Status VNestedLoopJoinNode::get_next(RuntimeState* state, Block* block, bool* eo SCOPED_CONSUME_MEM_TRACKER(mem_tracker()); if (_is_output_left_side_only) { - RETURN_IF_ERROR(get_left_side(state, block)); + RETURN_IF_ERROR(get_left_side(state, &_left_block)); + RETURN_IF_ERROR(_build_output_block(&_left_block, block)); *eos = _left_side_eos; reached_limit(block, eos); return Status::OK(); @@ -237,7 +239,6 @@ Status VNestedLoopJoinNode::get_next(RuntimeState* state, Block* block, bool* eo if (_left_side_eos) { _matched_rows_done = true; } else { - release_block_memory(_left_block); RETURN_IF_ERROR(get_left_side(state, &_left_block)); } } diff --git a/regression-test/data/query_p0/join/test_bitmap_filter.out b/regression-test/data/query_p0/join/test_bitmap_filter.out index 5ca226dfa1..24d7773720 100644 --- a/regression-test/data/query_p0/join/test_bitmap_filter.out +++ b/regression-test/data/query_p0/join/test_bitmap_filter.out @@ -48,3 +48,11 @@ 11 1989 13 -32767 +-- !sql6 -- +-32767 2 +255 1 +1985 1 +1989 3 +1991 2 +32767 1 + diff --git a/regression-test/suites/query_p0/join/test_bitmap_filter.groovy b/regression-test/suites/query_p0/join/test_bitmap_filter.groovy index 5d98d46b3b..d6770f2ce9 100644 --- a/regression-test/suites/query_p0/join/test_bitmap_filter.groovy +++ b/regression-test/suites/query_p0/join/test_bitmap_filter.groovy @@ -49,4 +49,6 @@ suite("test_bitmap_filter", "query_p0") { qt_sql4 "select t1.k1, t1.k2 from ${tbl1} t1 join ${tbl3} t3 on t1.k1 = t3.k1 where t1.k1 in (select k2 from ${tbl2} where k1 = 1) order by t1.k1;" qt_sql5 "select k1, k2 from ${tbl1} where k1 in (select k2 from ${tbl2}) and k2 not in (select k3 from ${tbl2}) order by k1;" + + qt_sql6 "select k2, count(k2) from ${tbl1} where k1 in (select k2 from ${tbl2}) group by k2 order by k2;" } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org