Skip to content

Commit efe6acd

Browse files
ClaudeClaude
authored andcommitted
docs: Document optional geo spatial SQL functions
Document the new opt-in spatial UDF support shipped in spiceai/spiceai#10833: - Add a Spatial SQL Functions section under runtime.params explaining the dual gate (Cargo --features geo on spiced, plus runtime.params.geo: enabled in the Spicepod) and a small ST_Point example.
1 parent 4e5d442 commit efe6acd

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

website/docs/reference/spicepod/runtime.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,27 @@ runtime:
149149
http_requests_per_minute_limit: 200
150150
```
151151

152+
### Spatial SQL Functions (opt-in)
153+
154+
PostGIS-style spatial `ST_*` SQL functions (via [`geodatafusion`](https://github.com/datafusion-contrib/geodatafusion)) can be optionally registered with the SQL engine.
155+
156+
| Parameter Name | Description |
157+
| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
158+
| `geo` | Set to `enabled` to register `ST_*` spatial functions. Requires a `spiced` binary built with the `geo` Cargo feature (`cargo build -p spiced --features geo`). Unset by default. |
159+
160+
Both gates must be satisfied: the binary must be built with `--features geo` **and** `runtime.params.geo: enabled` must be set in the Spicepod. Standard distributions of `spiced` do not include the `geo` feature, so spatial functions remain unregistered unless you produce a custom build.
161+
162+
```yaml
163+
runtime:
164+
params:
165+
geo: enabled
166+
```
167+
168+
```sql
169+
SELECT ST_AsText(ST_Point(0.0, 0.0)) AS geom;
170+
-- POINT(0 0)
171+
```
172+
152173
## `runtime.source_rate_control`
153174

154175
Optional. Configures how Spice limits outbound requests to upstream data sources, and optionally enables cluster-wide coordination through persisted state in object storage.

0 commit comments

Comments
 (0)