Pular para o conteúdo principal

st_ymax function

Applies to: check marked yes Databricks SQL check marked yes Databricks Runtime 17.1 and above

Preview

This feature is in Public Preview.

nota

This feature is not available on Databricks SQL Classic warehouses. To learn more about Databricks SQL warehouses, see SQL warehouse types

Returns the maximum Y coordinate of the input GEOMETRY, or NULL if the geometry is empty.

Syntax

st_ymax ( geoExpr )

Arguments

  • geoExpr: A GEOMETRY value.

Returns

A value of type DOUBLE, maximum Y coordinate of the input GEOMETRY.

The function returns NULL if the input is NULL or if the geometry is empty.

Examples

SQL
-- Returns the maximum Y coordinate of a non-empty geometry.
> SELECT st_ymax(st_geomfromtext('LINESTRING(10 34,44 57,30 24)'));
57.0
-- Returns `NULL` for an empty geometry.
> SELECT st_ymax(st_geomfromtext('POLYGON EMPTY'));
NULL