Fix: make error messages for st_area same as mysql

This commit is contained in:
Kedi Yang
2023-10-13 11:36:12 +08:00
parent f26cd7ba3a
commit d04981014a
2 changed files with 2 additions and 1 deletions

View File

@ -175,7 +175,7 @@ const char *ObGeoTypeUtil::get_geo_name_by_type(ObGeoType type)
break; break;
} }
case ObGeoType::GEOMETRYCOLLECTION:{ case ObGeoType::GEOMETRYCOLLECTION:{
type_name = "GEOMCOLLECTION"; type_name = "GEOMETRYCOLLECTION";
break; break;
} }
default:{ default:{

View File

@ -101,6 +101,7 @@ int ObExprSTArea::eval_st_area(const ObExpr &expr, ObEvalCtx &ctx, ObDatum &res)
ObGeoExprUtils::geo_func_error_handle(ret, N_ST_AREA); ObGeoExprUtils::geo_func_error_handle(ret, N_ST_AREA);
} else if (!std::isfinite(result)) { } else if (!std::isfinite(result)) {
ret = OB_OPERATE_OVERFLOW; ret = OB_OPERATE_OVERFLOW;
LOG_WARN("Result value is out of range in st_area", K(ret));
LOG_USER_ERROR(OB_OPERATE_OVERFLOW, "Result", N_ST_AREA); LOG_USER_ERROR(OB_OPERATE_OVERFLOW, "Result", N_ST_AREA);
} else { } else {
res.set_double(result); res.set_double(result);