From 75546edf81a8d854859946dae452f7e34c180b86 Mon Sep 17 00:00:00 2001 From: lucky-sinx <2549261744@qq.com> Date: Mon, 2 Dec 2024 09:14:56 +0000 Subject: [PATCH] fix for expandvecop, set_payload_shallow will unset null,leading to dup_expr null val != org_expr --- src/sql/engine/expand/ob_expand_vec_op.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sql/engine/expand/ob_expand_vec_op.cpp b/src/sql/engine/expand/ob_expand_vec_op.cpp index db7e4d5cf..6c9f4c9a9 100644 --- a/src/sql/engine/expand/ob_expand_vec_op.cpp +++ b/src/sql/engine/expand/ob_expand_vec_op.cpp @@ -365,8 +365,10 @@ int ObExpandVecOp::duplicate_expr(ObExpr *from, ObExpr *to) ObDiscreteFormat *to_data = static_cast(to_vec); ObBitmapNullVectorBase *from_nulls = static_cast(from_vec); for (int i = 0; i < brs_.size_; i++) { - if (brs_.skip_->at(i) || from_nulls->is_null(i)) { + if (brs_.skip_->at(i)) { to_data->set_payload_shallow(i, nullptr, 0); + } else if (from_nulls->is_null(i)) { + to_data->set_null(i); } else { to_data->set_payload_shallow(i, from_data->get_payload(i), from_data->get_length(i)); }