diff --git a/src/sql/engine/expr/ob_expr_in.cpp b/src/sql/engine/expr/ob_expr_in.cpp index 62c67b885a..8d8c211f28 100644 --- a/src/sql/engine/expr/ob_expr_in.cpp +++ b/src/sql/engine/expr/ob_expr_in.cpp @@ -55,6 +55,8 @@ bool Row::equal_key(const Row &other, void **cmp_funcs, const { bool equal_ret = false; if (OB_ISNULL(other.elems_) || OB_ISNULL(elems_)) { + } else if (other.elems_ == elems_) { + equal_ret = true; } else { bool is_equal = true; int curr_idx = idx; @@ -167,11 +169,16 @@ int ObExprInHashMap::set_refactored(const Row &row) tmp_row_key.meta_ = &meta_; if (OB_ISNULL(arr_ptr = const_cast> *> (map_.get(tmp_row_key)))) { ObArray> arr; - arr.set_tenant_id(MTL_ID()); - if (OB_FAIL(arr.push_back(row))) { - LOG_WARN("failed to load row", K(ret)); - } else { - ret = map_.set_refactored(tmp_row_key, arr); + ret = map_.set_refactored(tmp_row_key, arr); + if (OB_SUCC(ret)) { + arr_ptr = const_cast> *> (map_.get(tmp_row_key)); + CK (OB_NOT_NULL(arr_ptr)); + if (OB_SUCC(ret)) { + arr_ptr->set_tenant_id(MTL_ID()); + if (OB_FAIL(arr_ptr->push_back(row))) { + LOG_WARN("failed to push row", K(ret)); + } + } } } else { int exist = ObExprInHashMap::HASH_CMP_FALSE;