[CP][FEAT MERGE]SDO_GEOMETRY & MYSQL GIS EXPR IMPLEMENT

This commit is contained in:
wu-xingying
2024-04-08 13:45:07 +00:00
committed by ob-robot
parent 766a7c6c3c
commit 34c3718f40
344 changed files with 39680 additions and 3076 deletions

View File

@ -97,6 +97,11 @@ int ObPlanCacheObject::set_params_info(const ParamStore &params)
param_info.scale_ = data_type.get_scale();
}
LOG_DEBUG("ext params info", K(data_type), K(param_info), K(params.at(i)));
} else if (params.at(i).is_user_defined_sql_type() || params.at(i).is_collection_sql_type()) {
param_info.scale_ = 0;
uint64_t udt_id = params.at(i).get_accuracy().get_accuracy();
*(reinterpret_cast<uint32 *>(&param_info.ext_real_type_)) = (udt_id >> 32) & UINT_MAX32;
*(reinterpret_cast<uint32 *>(&param_info.col_type_)) = (udt_id) & UINT_MAX32;
} else {
param_info.scale_ = params.at(i).get_scale();
param_info.precision_ = params.at(i).get_precision();

View File

@ -127,7 +127,7 @@ struct ObParamInfo
common::ParamFlag flag_;
common::ObScale scale_;
common::ObObjType type_;
common::ObObjType ext_real_type_;
common::ObObjType ext_real_type_; // use as high 4 bytes of udt id if type is sql udt
//处理Oracle模式空串在plan_cache中的匹配
bool is_oracle_empty_string_;
common::ObCollationType col_type_;

View File

@ -251,10 +251,16 @@ int ObPlanSet::match_param_info(const ObParamInfo &param_info,
K(param.get_type()));
}
if (param.get_collation_type() != param_info.col_type_) {
if (param.get_collation_type() != param_info.col_type_
&& !(param.is_user_defined_sql_type() || param.is_collection_sql_type())) {
is_same = false;
} else if (param.get_param_meta().get_type() != param_info.type_) {
is_same = false;
} else if (param.is_user_defined_sql_type() || param.is_collection_sql_type()) {
uint64_t udt_id_param = param.get_accuracy().get_accuracy();
uint64_t udt_id_info = static_cast<uint64_t>(param_info.ext_real_type_) << 32
| static_cast<uint32_t>(param_info.col_type_);
is_same = (udt_id_info == udt_id_param) ? true : false;
} else if (param.is_ext()) {
ObDataType data_type;
if (!param_info.flag_.need_to_check_extend_type_) {