apache / apache/sedona-db

rust/sedona-functions: Improve CRS validation

Open
#501 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
503
Forks
61
Avg merge
2d 4h
Merged PRs (30d)
90

Description

Several functions, including `ST_SetCrs(), `ST_SetSRID()`, and constructors with an SRID argument like `ST_Point()` don't currently validate their input. For some of them I added the ability to register them with a `CrsEngine` such that it could be used for validation but this isn't actually used when we register the functions currently. Forthcoming functions like `ST_GeomFromEWKT()` and `ST_GeomFromEKWB()` will need this too ( https://github.com/apache/sedona-db/pull/498 ).

We can either lean in to CrsEngine validation (registered with a kernel) or try to provide something via the `ConfigOptions` or a thread local. (The `ConfigOptions` are now available in some places in ScalarUDF execution but we haven't wired them into SedonaDB kernels yet: https://github.com/apache/sedona-db/issues/248 ).

Contributor guide

Open the contributing guide

Research direction

Start with the rust/sedona-functions implementations and registration paths for ST_SetCrs(), ST_SetSRID(), and ST_Point(), then inspect the existing CrsEngine registration support. Determine how validation context should reach these functions, considering the CrsEngine, ConfigOptions, and thread-local alternatives described in the issue. Done means the affected functions validate SRID/CRS input and the approach can support forthcoming EWKT/EWKB constructors.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.