feat: Implement fast implementations of functions using WKBHeader
- Dominant language
- Rust
- Stars
- 503
- Forks
- 61
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 90
Description
Once PR https://github.com/apache/sedona-db/pull/171 is merged, we'll have a handle WKBHeader struct for performing fast computations without parsing the whole geometry. This issue will track the functions we should use it for once it's merged. Just took a quick pass through https://github.com/apache/sedona-db/issues/174. Possibly missed some or picked some that are not possible. Just jotting down notes
New Functions:
- GeometryType https://github.com/apache/sedona-db/issues/259
- ST_Zmflag
- ST_NumGeometries
- ST_NumInteriorRing
- ST_NumInteriorRings
- ST_NumRings
- ST_NumPoints
- ST_IsCollection
- ST_GeometryN (this would need some more logic on top of WKBHeader to iterate through geoms)
Update 11/8:
- ST_NDims
Speedup Existing Functions:
- ST_X/ST_Y
- ST_IsEmpty
- ST_Dimension (the GeomCollection case is more complicated since it would need to traverse each nested geoms header)
- alternatively, we can leverage this optimization only for the non-GeomCollection cases and leave the complex case for later
Contributor guide
Research direction
Start by reviewing PR 171 to understand the WKBHeader struct and compare the proposed functions with issue 174. Check the GeometryType work in issue 259, then define the scope for the listed new implementations and speedups, including the additional logic needed for nested geometries. Done means the selected functions use WKBHeader where applicable and the remaining complex cases are explicitly accounted for.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- database
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100