clockworklabs / clockworklabs/SpacetimeDB

SQL parser rejects negative numeric literals in `INSERT` statements

Open
#4,659 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Rust
Stars
25.2k
Forks
1.1k
Avg merge
2d 7h
Merged PRs (30d)
46

Description

Originally reported by yuvalz1950 in the community Discord: SpacetimeDB's SQL parser treats negative numbers as unsupported expressions in INSERT VALUES clauses, causing "Unsupported INSERT value" errors for negative numeric data.

Problem:

INSERT INTO table (col) VALUES (-100.0);
-- Error: Unsupported INSERT value: -100.0

Internally we have validated the issue occurs in C#, Rust and TypeScript modules, indicating this impacts all modules, and is likely caused by how the SQL Parser currently parses signed numbers.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the SQL Parser path that handles INSERT VALUES and signed numeric literals. Reproduce the -100.0 example, then verify that negative numeric literals are accepted without “Unsupported INSERT value” errors in the affected C#, Rust, and TypeScript modules.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, rust, sql, typescript
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.