[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

@ -18,6 +18,7 @@
#include "common/sql_mode/ob_sql_mode_utils.h"
#include "sql/engine/expr/ob_expr_type_to_str.h"
#include "sql/engine/ob_exec_context.h"
#include "lib/geo/ob_geo_utils.h"
using namespace oceanbase::common;
@ -349,6 +350,14 @@ int ObExprColumnConv::column_convert(const ObExpr &expr,
} else {
val->set_string(str);
}
} else if (ob_is_geometry(out_type)) {
ObString wkb = val->get_string();
ObGeoType geo_type = ObGeoCastUtils::get_geo_type_from_cast_mode(cast_mode);
if (OB_FAIL(ObGeoTypeUtil::check_geo_type(geo_type, wkb))) {
LOG_WARN("fail to check geo type", K(ret), K(wkb), K(geo_type), K(expr));
ret = OB_ERR_CANT_CREATE_GEOMETRY_OBJECT;
LOG_USER_ERROR(OB_ERR_CANT_CREATE_GEOMETRY_OBJECT);
}
}
if (OB_SUCC(ret)) {
const int64_t max_accuracy_len = static_cast<int64_t>(expr.max_length_);