Skip to content

Commit fd8e190

Browse files
edmondopclaude
andcommitted
Add Phase 1 SQL support with DataFusion and Substrait
Implements end-to-end SQL query pipeline for simple SELECT queries: Compile-time: MergedSelectionMap → DataFusion LogicalPlan → Substrait binary Runtime: Substrait plan → isograph-server execution → Arrow IPC response New components: - crates/sql_network_protocol: NetworkProtocol impl; LogicalPlan builder and Substrait serialization; parses SQL schema into Isograph's type model - crates/sql_lang_types, crates/sql_schema_parser: SQL-specific language types and DDL parser - crates/isograph_server: Axum HTTP server with /query endpoint - demos/sqlite-demo: end-to-end Vite+React demo using Star Wars planets SQLite - test-fixtures/databases: SQLite schema and init scripts for Phase 1–3 - E2E Playwright tests for the full pipeline Type system: widen NetworkResponseObject from branded-key mapped type to plain string index signature so SQL-generated types (e.g. { id: number, name: string }) satisfy the constraint without @ts-ignore. SQL numeric IDs accepted via id?: DataId | number. Zero breaking change for existing GraphQL code. Compiler: add readonly modifiers and field-name quoting to SQL-generated raw_response_type.ts files. Build fixes: update swc workspace deps for serde 1.0.220+ compatibility, fix clippy needless_return, add protoc to CI for substrait code generation, update pnpm lockfile, fix prettier and oxlint issues. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent c09c9db commit fd8e190

65 files changed

Lines changed: 6142 additions & 1005 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-cli.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,15 @@ jobs:
6666
with:
6767
packages: musl-tools # provides musl-gcc
6868
version: 1.0
69+
- name: Install protoc (Linux)
70+
if: runner.os == 'Linux'
71+
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
72+
- name: Install protoc (macOS)
73+
if: runner.os == 'macOS'
74+
run: brew install protobuf
75+
- name: Install protoc (Windows)
76+
if: runner.os == 'Windows'
77+
run: choco install protoc
6978
- name: 'Build isograph_cli with cargo (${{inputs.target}})'
7079
run: pnpm exec turbo ${{ inputs.cross && 'cross' || 'build-compiler' }} -- --target ${{ inputs.target }} --release
7180
- uses: actions/upload-artifact@v4

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,8 @@ jobs:
240240
with:
241241
toolchain: stable
242242
components: clippy
243+
- name: Install protoc
244+
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
243245
- name: Run cargo clippy
244246
run: cargo clippy
245247

@@ -253,6 +255,8 @@ jobs:
253255
with:
254256
toolchain: stable
255257
components: rustfmt
258+
- name: Install protoc
259+
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
256260
- name: Run cargo test
257261
run: cargo test
258262

.oxlintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "./node_modules/oxlint/configuration_schema.json",
3-
"ignorePatterns": ["__isograph", "vite-demo"],
3+
"ignorePatterns": ["__isograph", "vite-demo", "sqlite-demo"],
44
"plugins": ["typescript", "import"],
55
"env": { "node": true, "browser": true },
66
"rules": {

0 commit comments

Comments
 (0)