to issue<48456442>:fix dml stmt with udt hit plan issue
This commit is contained in:
@ -4192,6 +4192,18 @@ int ObCollectionConstructRawExpr::set_access_names(
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObCollectionConstructRawExpr::get_schema_object_version(share::schema::ObSchemaObjVersion &obj_version)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
CK (coll_schema_version_ != OB_INVALID_VERSION);
|
||||
CK (udt_id_ != common::OB_INVALID_ID);
|
||||
OX (obj_version.object_id_ = udt_id_);
|
||||
OX (obj_version.object_type_ = share::schema::DEPENDENCY_FUNCTION);
|
||||
OX (obj_version.version_ = coll_schema_version_);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObCollectionConstructRawExpr::assign(const ObRawExpr &other)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
@ -4209,6 +4221,7 @@ int ObCollectionConstructRawExpr::assign(const ObRawExpr &other)
|
||||
capacity_ = tmp.capacity_;
|
||||
udt_id_ = tmp.udt_id_;
|
||||
elem_type_ = tmp.elem_type_;
|
||||
coll_schema_version_ = tmp.coll_schema_version_;
|
||||
if (OB_FAIL(access_names_.assign(tmp.access_names_))) {
|
||||
LOG_WARN("failed to assign access names", K(ret));
|
||||
}
|
||||
@ -4272,6 +4285,19 @@ ObExprOperator *ObCollectionConstructRawExpr::get_op()
|
||||
return OB_SUCCESS == ret ? expr_op : NULL;
|
||||
}
|
||||
|
||||
int ObObjectConstructRawExpr::get_schema_object_version(share::schema::ObSchemaObjVersion &obj_version)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
CK (object_schema_version_ != OB_INVALID_VERSION);
|
||||
CK (udt_id_ != common::OB_INVALID_ID);
|
||||
OX (obj_version.object_id_ = udt_id_);
|
||||
OX (obj_version.object_type_ = share::schema::DEPENDENCY_FUNCTION);
|
||||
OX (obj_version.version_ = object_schema_version_);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
int ObObjectConstructRawExpr::set_access_names(
|
||||
const common::ObIArray<ObObjAccessIdent> &access_idents)
|
||||
{
|
||||
@ -4297,6 +4323,7 @@ int ObObjectConstructRawExpr::assign(const ObRawExpr &other)
|
||||
static_cast<const ObObjectConstructRawExpr &>(other);
|
||||
rowsize_ = tmp.rowsize_;
|
||||
udt_id_ = tmp.udt_id_;
|
||||
object_schema_version_ = tmp.object_schema_version_;
|
||||
if (OB_FAIL(elem_types_.assign(tmp.elem_types_))) {
|
||||
LOG_WARN("failed to assign elem types", K(ret));
|
||||
} else if (OB_FAIL(access_names_.assign(tmp.access_names_))) {
|
||||
|
||||
@ -3439,13 +3439,17 @@ public:
|
||||
type_(pl::ObPLType::PL_INVALID_TYPE),
|
||||
elem_type_(),
|
||||
capacity_(OB_INVALID_SIZE),
|
||||
udt_id_(OB_INVALID_ID) {}
|
||||
udt_id_(OB_INVALID_ID),
|
||||
database_id_(OB_INVALID_ID),
|
||||
coll_schema_version_(common::OB_INVALID_VERSION) {}
|
||||
ObCollectionConstructRawExpr()
|
||||
: ObSysFunRawExpr(),
|
||||
type_(pl::ObPLType::PL_INVALID_TYPE),
|
||||
elem_type_(),
|
||||
capacity_(OB_INVALID_SIZE),
|
||||
udt_id_(OB_INVALID_ID) {}
|
||||
udt_id_(OB_INVALID_ID),
|
||||
database_id_(OB_INVALID_ID),
|
||||
coll_schema_version_(common::OB_INVALID_VERSION) {}
|
||||
virtual ~ObCollectionConstructRawExpr() {}
|
||||
|
||||
inline void set_type(pl::ObPLType type) { type_ = type; }
|
||||
@ -3467,12 +3471,32 @@ public:
|
||||
|
||||
virtual ObExprOperator *get_op() override;
|
||||
|
||||
inline void set_database_id(int64_t database_id)
|
||||
{
|
||||
database_id_ = database_id;
|
||||
}
|
||||
|
||||
OB_INLINE uint64_t get_database_id() const { return database_id_; }
|
||||
|
||||
inline void set_coll_schema_version(int64_t schema_version)
|
||||
{
|
||||
coll_schema_version_ = schema_version;
|
||||
}
|
||||
|
||||
inline bool need_add_dependency()
|
||||
{
|
||||
return coll_schema_version_ != common::OB_INVALID_VERSION;
|
||||
}
|
||||
|
||||
int get_schema_object_version(share::schema::ObSchemaObjVersion &obj_version);
|
||||
|
||||
VIRTUAL_TO_STRING_KV_CHECK_STACK_OVERFLOW(N_ITEM_TYPE, type_,
|
||||
N_RESULT_TYPE, result_type_,
|
||||
N_EXPR_INFO, info_,
|
||||
N_REL_ID, rel_ids_,
|
||||
N_FUNC, get_func_name(),
|
||||
N_CHILDREN, exprs_);
|
||||
N_CHILDREN, exprs_,
|
||||
K_(coll_schema_version));
|
||||
private:
|
||||
pl::ObPLType type_; // PL_NESTED_TABLE_TYPE|PL_ASSOCIATIVE_ARRAY_TYPE|PL_VARRAY_TYPE
|
||||
pl::ObPLDataType elem_type_; // 记录复杂数据类型的元素类型
|
||||
@ -3480,6 +3504,8 @@ private:
|
||||
uint64_t udt_id_; // 记录复杂类型的ID
|
||||
// 用于打印构造函数的名字
|
||||
common::ObSEArray<common::ObString, 4, common::ModulePageAllocator, true> access_names_;
|
||||
int64_t database_id_;
|
||||
int64_t coll_schema_version_;
|
||||
};
|
||||
|
||||
class ObObjectConstructRawExpr : public ObSysFunRawExpr
|
||||
@ -3490,13 +3516,17 @@ public:
|
||||
rowsize_(0),
|
||||
udt_id_(OB_INVALID_ID),
|
||||
elem_types_(),
|
||||
access_names_() {}
|
||||
access_names_(),
|
||||
database_id_(OB_INVALID_ID),
|
||||
object_schema_version_(common::OB_INVALID_VERSION) {}
|
||||
ObObjectConstructRawExpr()
|
||||
: ObSysFunRawExpr(),
|
||||
rowsize_(0),
|
||||
udt_id_(OB_INVALID_ID),
|
||||
elem_types_(),
|
||||
access_names_() {}
|
||||
access_names_(),
|
||||
database_id_(OB_INVALID_ID),
|
||||
object_schema_version_(common::OB_INVALID_VERSION) {}
|
||||
|
||||
virtual ~ObObjectConstructRawExpr() {}
|
||||
|
||||
@ -3526,6 +3556,25 @@ public:
|
||||
int assign(const ObRawExpr &other) override;
|
||||
int inner_deep_copy(ObIRawExprCopier &copier) override;
|
||||
|
||||
inline void set_database_id(int64_t database_id)
|
||||
{
|
||||
database_id_ = database_id;
|
||||
}
|
||||
|
||||
OB_INLINE uint64_t get_database_id() const { return database_id_; }
|
||||
|
||||
inline void set_coll_schema_version(int64_t schema_version)
|
||||
{
|
||||
object_schema_version_ = schema_version;
|
||||
}
|
||||
|
||||
inline bool need_add_dependency()
|
||||
{
|
||||
return object_schema_version_ != common::OB_INVALID_VERSION;
|
||||
}
|
||||
|
||||
int get_schema_object_version(share::schema::ObSchemaObjVersion &obj_version);
|
||||
|
||||
virtual ObExprOperator *get_op() override;
|
||||
|
||||
VIRTUAL_TO_STRING_KV_CHECK_STACK_OVERFLOW(N_ITEM_TYPE, type_,
|
||||
@ -3533,7 +3582,9 @@ public:
|
||||
N_EXPR_INFO, info_,
|
||||
N_REL_ID, rel_ids_,
|
||||
N_FUNC, get_func_name(),
|
||||
N_CHILDREN, exprs_);
|
||||
N_CHILDREN, exprs_,
|
||||
K_(database_id),
|
||||
K_(object_schema_version));
|
||||
private:
|
||||
int64_t rowsize_;
|
||||
uint64_t udt_id_;
|
||||
@ -3541,6 +3592,8 @@ private:
|
||||
common::ObSEArray<ObExprResType, 5, common::ModulePageAllocator, true> elem_types_;
|
||||
// 用于打印构造函数的名字
|
||||
common::ObSEArray<common::ObString, 4, common::ModulePageAllocator, true> access_names_;
|
||||
int64_t database_id_;
|
||||
int64_t object_schema_version_;
|
||||
};
|
||||
|
||||
class ObUDFParamDesc
|
||||
|
||||
Reference in New Issue
Block a user