From 1d6ef8d0c4494e2915f4dab763510ba234bfb5f4 Mon Sep 17 00:00:00 2001 From: TengJianPing <18241664+jacktengg@users.noreply.github.com> Date: Mon, 25 Dec 2023 22:19:01 +0800 Subject: [PATCH] [fix](hash join) fix column ref DCHECK failure of hash join node block mem reuse (#28991) Introduced by #28851, after evaluating build side expr, some columns in resulting block may be referenced more than once in the same block. e.g. coalesce(col_a, 'string') if col_a is nullable but actually contains no null values, in this case funcition coalesce will insert a new nullable column which references the original col_a. --- be/src/vec/exec/join/vhash_join_node.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/be/src/vec/exec/join/vhash_join_node.cpp b/be/src/vec/exec/join/vhash_join_node.cpp index 30f2450f458c11a..60391716e28af66 100644 --- a/be/src/vec/exec/join/vhash_join_node.cpp +++ b/be/src/vec/exec/join/vhash_join_node.cpp @@ -692,7 +692,7 @@ Status HashJoinNode::_materialize_build_side(RuntimeState* state) { // data from data. while (!eos && (!_short_circuit_for_null_in_build_side || !_has_null_in_build_side) && (!_probe_open_finish || !_is_hash_join_early_start_probe_eos(state))) { - block.clear_column_data(); + release_block_memory(block, 1); RETURN_IF_CANCELLED(state); { SCOPED_TIMER(_build_get_next_timer);