From dd7b16ce93e1eefa4d91441016b3eeb03179e43c Mon Sep 17 00:00:00 2001 From: Hassan Abedi Date: Thu, 9 Apr 2026 12:46:26 +0200 Subject: [PATCH] Fix inconsistencies in the project --- Makefile | 8 ++++---- README.md | 51 ++++++++++++++++++++++++++++++++++++++++----------- flake.nix | 2 +- src/lib.rs | 3 ++- 4 files changed, 47 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 2a8169f..cd67631 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # Variables -BINARY_NAME := chase-rs +BINARY_NAME := query-engine BINARY := target/release/$(BINARY_NAME) DEBUG_PROJ := 0 RUST_BACKTRACE := 1 @@ -39,17 +39,17 @@ run: build ## Build and run the binary .PHONY: repl repl: format ## Start the interactive REPL - @echo "Starting chase-rs REPL..." + @echo "Starting query-engine REPL..." @DEBUG_PROJ=$(DEBUG_PROJ) cargo run -- repl .PHONY: gui gui: format ## Start the local GUI at 127.0.0.1:7878 - @echo "Starting chase-rs GUI on http://127.0.0.1:7878..." + @echo "Starting query-engine GUI on http://127.0.0.1:7878..." @DEBUG_PROJ=$(DEBUG_PROJ) cargo run -- gui .PHONY: gui-addr gui-addr: format ## Start the local GUI at GUI_ADDR= - @echo "Starting chase-rs GUI on http://$(or $(GUI_ADDR),127.0.0.1:7878)..." + @echo "Starting query-engine GUI on http://$(or $(GUI_ADDR),127.0.0.1:7878)..." @DEBUG_PROJ=$(DEBUG_PROJ) cargo run -- gui $(or $(GUI_ADDR),127.0.0.1:7878) .PHONY: script diff --git a/README.md b/README.md index f91722d..39278f4 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,9 @@ An experimental Rust project for building query-engine components. Right now the repository is centered on a chase-based reasoning core plus a -small interactive frontend. The broader target shape is a query engine with -clearer front-end, planning, optimization, and execution boundaries. +small interactive frontend, plus an early relational/SQL scaffold. The broader +target shape is a query engine with clearer front-end, planning, optimization, +and execution boundaries. ### Current scope @@ -12,20 +13,22 @@ clearer front-end, planning, optimization, and execution boundaries. - Restricted-chase style materialization with active-trigger checks - Provenance-oriented explanations for derived answers - Script, REPL, and local web UI for experimentation +- Relational schema, catalog, logical-plan, and execution scaffolding +- A minimal SQL slice for single-table `SELECT-FROM-WHERE` queries -### Intended direction +### Intended Direction -The medium-term direction is to evolve this project from a copied -`chase-rs` codebase into a more general query-engine playground with: +The medium-term direction is to evolve this project into a more general +query-engine playground with: - explicit front-end and parsing layers - internal planning representations - clearer separation between logical meaning and execution strategy - support for multiple query-engine experiments instead of only chase logic -The current code does not yet implement a SQL front end, logical plan, or -physical plan. The repository naming, docs, and user-facing surfaces now -reflect that more honestly. +The current code now includes an initial SQL front end, logical plan, and +execution path. It is still intentionally narrow and should not be read as full +SQL support. ### Quickstart @@ -81,6 +84,32 @@ reset help ``` +#### Current SQL Slice + +The repository now has a narrow SQL pipeline with: + +- predicate-backed catalog inference +- relational schemas, rows, and values +- SQL parsing for a small subset +- logical planning +- execution for single-table queries + +Currently supported examples: + +```sql +SELECT * FROM Parent +SELECT c0 FROM Parent +SELECT c0 FROM Parent WHERE c1 = 'bob' +``` + +Current limits: + +- single-table only +- positional column names such as `c0`, `c1` +- no joins +- no aggregates +- no aliases + ### Development For non-trivial changes, run: @@ -93,9 +122,9 @@ cargo fmt --check ### Notes -This repository is still centered on a rule-engine core. The longer-term goal -is to grow it into a broader query-engine project without claiming SQL, -logical-planning, or physical-planning support before those layers exist. +This repository is still centered on a rule-engine core. The new SQL-related +modules are scaffolding for a broader query-engine direction, not a claim of +feature-complete SQL support. ### License diff --git a/flake.nix b/flake.nix index 6a814fc..2061e28 100644 --- a/flake.nix +++ b/flake.nix @@ -31,7 +31,7 @@ ]; shellHook = '' - echo "chase-rs development shell" + echo "query-engine development shell" echo "Rust: $(rustc --version)" ''; diff --git a/src/lib.rs b/src/lib.rs index fc02713..a0e8f74 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,7 +2,8 @@ //! //! The current codebase primarily contains a chase-based reasoning core plus //! lightweight frontends for experimenting with rule-driven query answering. -//! It is not yet a full SQL engine with logical and physical planning layers. +//! It also contains an early relational and SQL scaffold for a narrow +//! single-table `SELECT-FROM-WHERE` slice. It is not yet a full SQL engine. pub mod catalog; pub mod chase;