fix sdo_geometry returnning into by ps protocol
This commit is contained in:
@ -390,6 +390,26 @@ int ObSql::fill_result_set(ObResultSet &result_set,
|
|||||||
} else if (ObNumberType == field.type_.get_type()) {
|
} else if (ObNumberType == field.type_.get_type()) {
|
||||||
field.type_.set_number(number);
|
field.type_.set_number(number);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (expr->get_result_type().is_geometry()) {
|
||||||
|
uint16_t subschema_id = ObInvalidSqlType;
|
||||||
|
ObSqlUDTMeta udt_meta;
|
||||||
|
field.type_.meta_.set_ext();
|
||||||
|
field.accuracy_.set_accuracy(T_OBJ_SDO_GEOMETRY);
|
||||||
|
if (OB_FAIL(result_set.get_exec_context().get_subschema_id_by_udt_id(T_OBJ_SDO_GEOMETRY, subschema_id))) {
|
||||||
|
LOG_WARN("unsupported udt id", K(ret), K(subschema_id));
|
||||||
|
} else if (OB_FAIL(result_set.get_exec_context().get_sqludt_meta_by_subschema_id(subschema_id, udt_meta))) {
|
||||||
|
LOG_WARN("failed to get udt meta", K(ret), K(subschema_id));
|
||||||
|
} else if(ObObjUDTUtil::ob_is_supported_sql_udt(udt_meta.udt_id_)) {
|
||||||
|
field.type_.set_subschema_id(subschema_id);
|
||||||
|
if (OB_FAIL(ob_write_string(alloc, ObString(udt_meta.udt_name_len_, udt_meta.udt_name_), field.type_name_))) {
|
||||||
|
LOG_WARN("fail to alloc string", K(i), K(field), K(ret));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ret = OB_NOT_SUPPORTED;
|
||||||
|
LOG_WARN("udt type not supported", K(ret), K(subschema_id));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (OB_SUCC(ret)) {
|
if (OB_SUCC(ret)) {
|
||||||
if (OB_FAIL(ob_write_string(alloc, returning_strs.at(i), field.cname_))) {
|
if (OB_FAIL(ob_write_string(alloc, returning_strs.at(i), field.cname_))) {
|
||||||
|
Reference in New Issue
Block a user