[FEAT MERGE] GIS

This commit is contained in:
obdev
2022-12-23 12:08:27 +00:00
committed by ob-robot
parent 38846e73d6
commit 40d215fc5a
519 changed files with 158600 additions and 8396 deletions

View File

@ -458,7 +458,8 @@ int ObObj::build_not_strict_default_value()
case ObTinyTextType:
case ObTextType:
case ObMediumTextType:
case ObLongTextType: {
case ObLongTextType:
case ObGeometryType: {
ObString null_str;
set_string(data_type, null_str);
meta_.set_inrow();
@ -519,7 +520,7 @@ int ObObj::build_not_strict_default_value()
int ObObj::deep_copy(const ObObj &src, char *buf, const int64_t size, int64_t &pos)
{
int ret = OB_SUCCESS;
if (ob_is_string_type(src.get_type()) || ob_is_json(src.get_type())) {
if (ob_is_string_type(src.get_type()) || ob_is_json(src.get_type()) || ob_is_geometry(src.get_type())) {
ObString src_str = src.get_string();
if (OB_UNLIKELY(size < (pos + src_str.length()))) {
ret = OB_BUF_NOT_ENOUGH;
@ -582,7 +583,8 @@ int ObObj::deep_copy(const ObObj &src, char *buf, const int64_t size, int64_t &p
void* ObObj::get_deep_copy_obj_ptr()
{
void * ptr = NULL;
if (ob_is_string_type(this->get_type()) || ob_is_json(this->get_type())) {
if (ob_is_string_type(this->get_type()) || ob_is_json(this->get_type())
|| ob_is_geometry(this->get_type())) {
// val_len_ == 0 is empty string, and it may point to unexpected address
// Therefore, reset it to NULL
if (val_len_ != 0) {
@ -890,7 +892,8 @@ int ObObj::apply(const ObObj &mutation)
&& ObNullType != mut_type
&& org_type != mut_type
&& !(ObLongTextType == org_type && ObLobType == mut_type)
&& !(ObJsonType == org_type && ObLobType == mut_type)))) {
&& !(ObJsonType == org_type && ObLobType == mut_type)
&& !(ObGeometryType == org_type && ObLobType == mut_type)))) {
_OB_LOG(WARN, "type not coincident or invalid type[this->type:%d,mutation.type:%d]",
org_type, mut_type);
ret = OB_INVALID_ARGUMENT;
@ -1004,7 +1007,8 @@ ObObjTypeFuncs OBJ_FUNCS[ObMaxType] =
DEF_FUNC_ENTRY(ObNCharType), // 44, nchar
DEF_FUNC_ENTRY(ObURowIDType), // 45, urowid
DEF_FUNC_ENTRY(ObLobType), // 46, lob
DEF_FUNC_ENTRY(ObJsonType) // 47, json
DEF_FUNC_ENTRY(ObJsonType), // 47, json
DEF_FUNC_ENTRY(ObGeometryType) // 48, geometry TODO!!!!!
};
ob_obj_hash ObObjUtil::get_murmurhash_v3(ObObjType type)
@ -1118,7 +1122,7 @@ int ObObj::print_smart(char *buf, int64_t buf_len, int64_t &pos) const
if (OB_ISNULL(buf) || OB_UNLIKELY(buf_len <=0)) {
ret = OB_INVALID_ARGUMENT;
} else if (!(meta_.is_string_or_lob_locator_type() && ObHexStringType != meta_.get_type())
&& (!meta_.is_json())) {
&& (!meta_.is_json()) && (!meta_.is_geometry())) {
ret = OBJ_FUNCS[meta_.get_type()].print_json(*this, buf, buf_len, pos, params);
} else if (OB_FAIL(is_printable(get_string_ptr(), get_string_len(), can_print))) {
} else if (can_print) {
@ -1520,6 +1524,7 @@ void ParamFlag::reset()
is_pl_mock_default_param_ = false;
is_boolean_ = false;
is_batch_parameter_ = false;
ignore_scale_check_ = false;
}