clockworklabs / clockworklabs/SpacetimeDB
Support value tuple literals in SQL
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 reimplementing the work from stale PR #2843, which has been closed because it is too far out of date to merge directly.
Original pull request
- PR #2843: Implemented value tuple literal in SQL
- Original author: @egormanga
What the original PR was trying to do
Description of Changes There's been no way to use product types like this: because SQL queries containing tuples: would fail with: Error: Unsupported expression: (0, 0) This PR implements tuple support for = and != operators (subject to further expansion). API and ABI breaking changes None. Expected complexity level and risk 2. Testing - [x] Manual testing using custom struct columns. - [ ] Needs unit tests. I leave this open for contributions or as an exercise to the employees.
Closure context
- I think we would like to take a design pass on the syntax, especially because this PR is using tuple syntax for product values. We'd like to evaluate Postgres and ANSI syntax for this feature. I'm going to close this PR and create a ticket to track this feature.
Reimplementation notes
- Reimplement this work on top of current
masterin a new PR. - Keep the original PR linked as historical context and as a source of useful implementation ideas where still relevant.
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 reviewing PR #2843 and its implementation ideas, then compare PostgreSQL and ANSI syntax for tuple literals as requested in the closure notes. Define the supported syntax and operator scope, including = and !=, and add unit tests alongside the existing manual testing coverage before validating the feature on current master.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, sql
- Domain
- database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100