h3_isvalid
function
Applies to: Databricks SQL
Databricks Runtime 11.3 LTS and above
Returns true if the input BIGINT or STRING is a valid H3 cell ID.
Syntax
h3_isvalid ( expr )
Arguments
expr
: A BIGINT expression, or a STRING expression.
Returns
A value of type BOOLEAN, indicating whether the input BIGINT or STRING corresponds to a valid H3 cell ID or not.
The function returns NULL if the input is NULL.
Examples
-- 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
Related functions
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για