Nota
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare ad accedere o modificare le directory.
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare a modificare le directory.
Funzione
Si applica a:
controllo SQL di Databricks
Databricks Runtime 17.1 e versioni successive
Important
Questa funzionalità è in Anteprima Pubblica.
Annotazioni
Questa funzionalità non è disponibile in Databricks SQL Classic Warehouses. Per altre informazioni sui databricks SQL Warehouse, vedere Tipi di SQL Warehouse.
Restituisce il numero di punti non vuoti nei valori di input GEOGRAPHY o GEOMETRY.
Syntax
st_npoints ( geoExpr )
Arguments
-
geoExpr: un valoreGEOGRAPHYoGEOMETRY.
Returns
Un valore di tipo INT, che rappresenta il numero di punti non vuoti nel valore di input GEOGRAPHY o GEOMETRY.
La funzione restituisce NULL se l'input è NULL.
Examples
-- Returns the number of points in a non-empty multipoint geometry.
> SELECT st_npoints(st_geomfromtext('MULTIPOINT(10 34,44 57,EMPTY)'));
2
-- Returns the number of points in an empty multipoint geometry.
> SELECT st_npoints(st_geomfromtext('MULTIPOINT(EMPTY,EMPTY)'));
0
-- Returns the number of points in a non-empty polygon geometry.
> SELECT st_npoints(st_geomfromtext('POLYGON((0 0,1 0,1 1,0 1,0 0))'));
5