Audit existing sx implementations against SedonaDB sources. Use when reviewing implementations after SedonaDB updates, verifying existing functions match current documentation, or identifying unimplemented functions.
Use this skill to verify that existing sx implementations correctly match current SedonaDB sources, or to identify functions that need updates after a SedonaDB version change.
Read .sync/sedona-db/rust/sedona-functions/src/register.rs and extract all registered UDFs from:
register_scalar_udfs! - Scalar functionsregister_aggregate_udfs! - Aggregate functionsFind all R/sx_*.R files and extract the function names.
Create or update .claude/research/sedona/_inventory.md:
# SedonaDB Function Inventory
Last updated: [date]
SedonaDB version: [check .sync/sedona-db]
sx version: [check DESCRIPTION]
## Summary
- Total SedonaDB functions: XX
- Implemented in sx: XX
- Not implemented: XX
## Implemented Functions
| SedonaDB Function | sx Function | File | Tests | Notes |
|-------------------|-------------|------|-------|-------|
| ST_Buffer | sx_buffer | R/sx_buffer.R | Yes | |
| ST_Centroid | sx_centroid | R/sx_centroid.R | Yes | |
| ST_Envelope | sx_envelope | R/sx_envelope.R | Yes | |
| ST_Simplify | sx_simplify | R/sx_simplify.R | Yes | |
| ST_Transform | sx_transform | R/sx_transform.R | Yes | |
| ST_Join predicates | sx_join | R/sx_join.R | Yes | |
## Not Implemented
| SedonaDB Function | sf Equivalent | Priority | Notes |
|-------------------|---------------|----------|-------|
| ST_ConvexHull | st_convex_hull | Medium | |
| ST_Difference | st_difference | Medium | Binary op |
| ST_Intersection | st_intersection | High | Binary op, common |
| ST_Union | st_union | High | Binary op, common |
| ST_Area | st_area | High | Returns numeric |
| ST_Length | st_length | High | Returns numeric |
| ST_Distance | st_distance | High | Returns numeric |
| ... | ... | ... | ... |
## Function Categories
### Constructors (create geometry)
- ST_Point, ST_MakeLine, ST_GeomFromWKT, ST_GeomFromWKB, etc.
### Accessors (extract properties)
- ST_X, ST_Y, ST_Z, ST_M, ST_SRID, ST_CRS, ST_AsText, ST_AsBinary, etc.
### Metrics (return numeric)
- ST_Area, ST_Length, ST_Perimeter, ST_Distance, etc.
### Predicates (return boolean)
- ST_Contains, ST_Within, ST_Intersects, ST_Disjoint, etc.
### Transformations (return geometry)
- ST_Buffer, ST_Centroid, ST_ConvexHull, ST_Simplify, etc.
### Overlay (binary geometry operations)
- ST_Union, ST_Intersection, ST_Difference, ST_SymDifference
### Aggregates (multiple rows to one)
- ST_Union_Agg, ST_Collect_Agg, ST_Envelope_Agg, etc.
For each implemented function, verify:
Since version is noted (if changed recently)test-sx_{name}.R)test-sx_vs_sf_{name}.R)@seealso link is correct and workingCreate or update .claude/research/sedona/_audit_report.md:
# sx SedonaDB Audit Report
Generated: [date]
SedonaDB Version: [from .sync/sedona-db]
sx Version: [from DESCRIPTION]
## Summary
- Functions audited: XX
- Needing updates: XX
- Not implemented: XX
- All tests passing: Yes/No
## Functions Needing Attention
### Updates Required
| Function | Issue | Priority | Action |
|----------|-------|----------|--------|
| sx_buffer | Missing new param from v0.3 | High | Add buffer_style param |
### Missing Tests
| Function | Issue | Priority |
|----------|-------|----------|
| sx_simplify | No sf comparison test | Medium |
### Documentation Issues
| Function | Issue | Priority |
|----------|-------|----------|
| sx_centroid | @seealso link broken | Low |
## Detailed Findings
### sx_buffer
- **Status:** Needs update
- **Issue:** SedonaDB v0.3 added `buffer_style` parameter
- **Current signature:** `ST_Buffer(geom, distance)`
- **New signature:** `ST_Buffer(geom, distance, buffer_style?)`
- **Action:** Add optional `buffer_style` parameter
- **Priority:** High
### sx_centroid
- **Status:** OK
- **Last verified:** [date]
- **Notes:** Matches current SedonaDB implementation
### sx_envelope
- **Status:** OK
- **Last verified:** [date]
[Continue for each function...]
## Recommendations
### High Priority
1. Update sx_buffer to support new parameters
2. Implement ST_Intersection (commonly used)
3. Implement ST_Area (basic accessor)
### Medium Priority
1. Add missing sf comparison tests
2. Implement ST_ConvexHull
3. Implement ST_Union
### Low Priority
1. Fix documentation links
2. Implement less common functions
Use this priority framework:
| Priority | Criteria | |----------|----------| | High | Function behavior changed, security issues, broken functionality, commonly used function missing | | Medium | New optional parameters, documentation updates, moderately used function missing | | Low | Minor improvements, style consistency, rarely used function missing |
For functions needing updates:
sedona-research skill to get current stateFor unimplemented functions:
sedona-research skillsedona-implement skillregister.rssx_* implementations.claude/research/sedona/_inventory.md.claude/research/sedona/_audit_report.md# Find all registered SedonaDB functions
grep -E "crate::" .sync/sedona-db/rust/sedona-functions/src/register.rs | wc -l
# Find all sx implementations
ls R/sx_*.R | wc -l
# Run all sx tests
Rscript -e "devtools::test(filter = '^sx_')"
# Check for missing test files
for f in R/sx_*.R; do
name=$(basename "$f" .R)
if [ ! -f "tests/testthat/test-$name.R" ]; then
echo "Missing tests: $name"
fi
done
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer