st_m 函数

适用于:检查标记为“是”的 Databricks SQL 检查标记为“是”是 Databricks Runtime 17.1 及更高版本

Important

此功能目前以公共预览版提供。

注释

此功能在 Databricks SQL 经典仓库上不可用。 若要详细了解 Databricks SQL 仓库,请参阅 SQL 仓库类型

返回输入点 GEOMETRY 值的 M 坐标,或者 NULL 该点为空或没有 M 坐标。

Syntax

st_m ( geoExpr )

Arguments

  • geoExpr:一个 GEOMETRY 值。

Returns

类型为DOUBLE的值,即输入点GEOMETRY的M坐标。

如果输入为NULL或点为空,则函数返回NULL

错误条件

Examples

-- Returns the M coordinate of a non-empty point geometry with an M coordinate.
> SELECT st_m(st_geomfromtext('POINT M (2 3 4)'));
  4.0
-- Returns the M coordinate of a non-empty point geometry without an M coordinate.
> SELECT st_m(st_geomfromtext('POINT Z (1 2 3)'));
  NULL
-- Returns `NULL` for an empty point geometry.
> SELECT st_m(st_geomfromtext('POINT ZM EMPTY'));
  NULL