ST_DISTANCE (Lakehouse v1)
Returns the minimum Euclidean distance between two GEOMETRY objects.
SQL Syntax
Section titled “SQL Syntax”ST_DISTANCE(<geometry1>, <geometry2>)Arguments
Section titled “Arguments”| Arguments | Description |
|---|---|
<geometry1> | The argument must be an expression of type GEOMETRY and must contain a Point. |
<geometry2> | The argument must be an expression of type GEOMETRY and must contain a Point. |
Return Type
Section titled “Return Type”Double.
SQL Examples
Section titled “SQL Examples”SELECT ST_DISTANCE( TO_GEOMETRY('POINT(0 0)'), TO_GEOMETRY('POINT(1 1)') ) AS distance
┌─────────────┐│ distance │├─────────────┤│ 1.414213562 │└─────────────┘