clockworklabs / clockworklabs/SpacetimeDB
Reimplement: Add btree index filters to the C# sdk with codegen
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 25.2k
- Forks
- 1.1k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 46
Description
This issue tracks reimplementation of the work from stale PR #1848, which is being closed because it is too out of date to merge directly.
Original PR: https://github.com/clockworklabs/SpacetimeDB/pull/1848
Original author: @lcodes
Original branch: `jeremie/btree-index-bounds-cs`
Base branch: `master`
## Original PR summary
# Description of Changes
Adds support for multi-column btree index filtering in the C# client
- codegen emitting Filter() overloads in the index handles
- codegen emitting BTree storage and comparison operators
- runtime changes to make Address and Identity comparable
API and ABI breaking changes
No breaks.
Expected complexity level and risk
Most complexity is in the codegen, the runtime behavior is straightforward; a SortedSet<> per btree with a comparator matching its key columns, and Filter() methods querying that sorted set with min/max values derived from the table row type.
Testing
## Follow-up
- Reimplement this change in a fresh PR against current `master`.
- Carry forward any still-relevant context from the original PR discussion and review.
- Link the new implementation PR back to the original stale PR for historical context.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading stale PR #1848 and compare its C# SDK codegen and runtime changes with current master. Reimplement multi-column btree index filtering, including generated Filter() overloads, btree comparison operators, and comparable Address and Identity behavior; verify the generated API and runtime behavior against the original PR context.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, rust
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100