Condividi tramite


Funzione h3_isvalid

Si applica a: segno di spunta sì Databricks SQL segno di spunta sì Databricks Runtime 11.3 LTS e versioni successive

Restituisce true se l'input BIGINT o STRING è un ID cella H3 valido.

Sintassi

h3_isvalid ( expr )

Argomenti

  • expr: espressione BIGINT o espressione STRING.

Valori restituiti

Valore di tipo BOOLEAN, che indica se l'input BIGINT o STRING corrisponde o meno a un ID cella H3 valido.

La funzione restituisce NULL se l'input è NULL.

Esempi

-- Simple example taking a long as input.
> SELECT h3_isvalid(599686042433355775)
  true

-- Simple example taking a valid hexadecimal string as input.
> SELECT h3_isvalid('85283473fffffff')
  true

-- Example taking a long as input that is not a valid H3 cell ID.
> SELECT h3_isvalid(599686042433355776)
  false

-- Example where the input is an invalid hexadecimal string.
> SELECT h3_isvalid('I am not an H3 cell ID')
  false