Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

### Added

- Implement top-level columnar SQL Engine API, CSV table registration, query cursor, and golden query suite
- Implement physical query planner, rule-based optimizer, and EXPLAIN plan formatter with execution metrics.
- Add vectorized execution operators, expressions evaluator, three-valued logic, hash aggregation and join
- Add SQL lexer and recursive descent parser for SELECT queries, expressions, JOINs, and aggregations.
Expand Down
16 changes: 16 additions & 0 deletions docs/PROJECT.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,19 @@ Total: $1.1718. Prices: Anthropic list prices.
| fix-2 | gemini-3.8-flash | no | 81081 | 3380 | 0 | 709215 | 0.1267 |

Total: $0.3134. Prices: Anthropic list prices.

## Factory run columnar-sql-engine-engine-api (measured from API usage)

| Phase | Model | Batch | Input | Output | Cache write | Cache read | Cost (USD) |
|---|---|---|---|---|---|---|---|
| generation | gemini-3.8-flash | yes | 9408 | 36961 | 0 | 0 | 0.0728 |
| fix-1 | gemini-3.8-flash | no | 33828 | 212 | 0 | 29493 | 0.0284 |
| fix-2 | gemini-3.8-flash | no | 101922 | 1017 | 0 | 1277721 | 0.1761 |
| fix-3 | gemini-3.8-flash | no | 171604 | 1066 | 0 | 1254232 | 0.2268 |
| fix-4 | gemini-3.8-flash | no | 102444 | 1041 | 0 | 1326758 | 0.1802 |
| fix-5 | gemini-3.8-flash | no | 102335 | 1036 | 0 | 1320853 | 0.1797 |
| fix-6 | gemini-3.8-flash | no | 105746 | 1059 | 0 | 1414693 | 0.1894 |
| audit | gemini-3.1-flash-lite | no | 40848 | 420 | 0 | 20045 | 0.0113 |
| fix-1 | gemini-3.8-flash | no | 91955 | 763 | 0 | 883759 | 0.1381 |

Total: $1.2028. Prices: Anthropic list prices.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Vectorized In-Memory SQL Execution Engine and API Implementation

Status: accepted (generated, pending human review)

## Context

The columnar SQL engine requires a top-level engine interface (EngineAPI) supporting table registration from CSV streams, query execution yielding row cursors (RowsCursor), and EXPLAIN query plan inspection, as well as a comprehensive golden queries test suite.

## Decision

Implement the complete EngineAPI and RowsCursor in internal/engine. Query planning parses SELECT queries, validates column references, coordinates joins, filters, hash aggregates, and sorts according to three-valued NULL logic, and emits column vectors in record batches conforming to configured batch sizes.

## Consequences

Provides full compliance with EngineAPI and frozen interface specifications while adhering strictly to zero external runtime dependency rules and executing golden queries deterministically.
Loading
Loading