[GIS] get_geo_type_by_name bugfix
This commit is contained in:
2
deps/oblib/src/lib/geo/ob_geo_utils.cpp
vendored
2
deps/oblib/src/lib/geo/ob_geo_utils.cpp
vendored
@ -136,6 +136,8 @@ ObGeoType ObGeoTypeUtil::get_geo_type_by_name(ObString &name)
|
|||||||
geo_type = ObGeoType::MULTIPOLYGON;
|
geo_type = ObGeoType::MULTIPOLYGON;
|
||||||
} else if (0 == name.case_compare("geometrycollection")) {
|
} else if (0 == name.case_compare("geometrycollection")) {
|
||||||
geo_type = ObGeoType::GEOMETRYCOLLECTION;
|
geo_type = ObGeoType::GEOMETRYCOLLECTION;
|
||||||
|
} else if (0 == name.case_compare("geometry")) {
|
||||||
|
geo_type = ObGeoType::GEOMETRY;
|
||||||
} else {
|
} else {
|
||||||
LOG_WARN_RET(OB_INVALID_ARGUMENT, "get type by name failed", K(geo_type));
|
LOG_WARN_RET(OB_INVALID_ARGUMENT, "get type by name failed", K(geo_type));
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ ObCreateTableResolver::ObCreateTableResolver(ObResolverParams ¶ms)
|
|||||||
is_oracle_temp_table_(false),
|
is_oracle_temp_table_(false),
|
||||||
index_arg_(),
|
index_arg_(),
|
||||||
current_index_name_set_(),
|
current_index_name_set_(),
|
||||||
cur_column_group_id_(0)
|
cur_udt_set_id_(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,9 +71,9 @@ uint64_t ObCreateTableResolver::gen_column_id()
|
|||||||
return ++cur_column_id_;
|
return ++cur_column_id_;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t ObCreateTableResolver::gen_column_group_id()
|
uint64_t ObCreateTableResolver::gen_udt_set_id()
|
||||||
{
|
{
|
||||||
return ++cur_column_group_id_;
|
return ++cur_udt_set_id_;
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t ObCreateTableResolver::get_primary_key_size() const
|
int64_t ObCreateTableResolver::get_primary_key_size() const
|
||||||
@ -1411,7 +1411,7 @@ int ObCreateTableResolver::resolve_table_elements(const ParseNode *node,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (OB_SUCC(ret) && column.is_xmltype()) {
|
if (OB_SUCC(ret) && column.is_xmltype()) {
|
||||||
column.set_udt_set_id(gen_column_group_id());
|
column.set_udt_set_id(gen_udt_set_id());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (OB_SUCC(ret)) {
|
if (OB_SUCC(ret)) {
|
||||||
@ -1839,7 +1839,7 @@ int ObCreateTableResolver::resolve_table_elements_from_select(const ParseNode &p
|
|||||||
column.set_meta_type(xml_meta);
|
column.set_meta_type(xml_meta);
|
||||||
column.set_sub_data_type(T_OBJ_XML);
|
column.set_sub_data_type(T_OBJ_XML);
|
||||||
// udt column is varbinary used for null bitmap
|
// udt column is varbinary used for null bitmap
|
||||||
column.set_udt_set_id(gen_column_group_id());
|
column.set_udt_set_id(gen_udt_set_id());
|
||||||
} else {
|
} else {
|
||||||
ret = OB_ERR_INVALID_DATATYPE;
|
ret = OB_ERR_INVALID_DATATYPE;
|
||||||
LOG_WARN("invalid data type", K(ret), K(*expr));
|
LOG_WARN("invalid data type", K(ret), K(*expr));
|
||||||
|
@ -67,7 +67,7 @@ private:
|
|||||||
DISALLOW_COPY_AND_ASSIGN(ObCreateTableResolver);
|
DISALLOW_COPY_AND_ASSIGN(ObCreateTableResolver);
|
||||||
// function members
|
// function members
|
||||||
uint64_t gen_column_id();
|
uint64_t gen_column_id();
|
||||||
uint64_t gen_column_group_id();
|
uint64_t gen_udt_set_id();
|
||||||
int64_t get_primary_key_size() const;
|
int64_t get_primary_key_size() const;
|
||||||
int add_primary_key_part(const common::ObString &column_name, common::ObArray<ObColumnResolveStat> &stats, int64_t &pk_data_length);
|
int add_primary_key_part(const common::ObString &column_name, common::ObArray<ObColumnResolveStat> &stats, int64_t &pk_data_length);
|
||||||
int add_hidden_tablet_seq_col();
|
int add_hidden_tablet_seq_col();
|
||||||
@ -149,7 +149,7 @@ private:
|
|||||||
common::ObSEArray<GenColExpr, 5> gen_col_exprs_;//store generated column and dependent exprs
|
common::ObSEArray<GenColExpr, 5> gen_col_exprs_;//store generated column and dependent exprs
|
||||||
common::ObSEArray<ObRawExpr *, 5> constraint_exprs_;//store constraint exprs
|
common::ObSEArray<ObRawExpr *, 5> constraint_exprs_;//store constraint exprs
|
||||||
|
|
||||||
uint64_t cur_column_group_id_;
|
uint64_t cur_udt_set_id_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // end namespace sql
|
} // end namespace sql
|
||||||
|
Reference in New Issue
Block a user