diff --git a/src/sql/engine/expr/ob_expr_operator.cpp b/src/sql/engine/expr/ob_expr_operator.cpp index e4d1df5bc2..1777ef36ad 100644 --- a/src/sql/engine/expr/ob_expr_operator.cpp +++ b/src/sql/engine/expr/ob_expr_operator.cpp @@ -1360,8 +1360,8 @@ int ObExprOperator::aggregate_result_type_for_merge( } else if (ob_is_string_or_lob_type(res_type)) { const ObExprResType *new_types = types; const ObSQLSessionInfo *session_info = type_ctx.get_session(); + ObSEArray restored_types; if (has_new_enum_set_type && session_info != NULL) { - ObSEArray restored_types; for (int64_t i = 0; OB_SUCC(ret) && i < param_num; ++i) { if (OB_FAIL(restored_types.push_back(types[i]))) { LOG_WARN("fail to push back types", K(ret));