Internals¶
Deep dive into Uni's implementation details.
### [Vectorized Execution](vectorized-execution.md)
Batch processing, Arrow integration, and SIMD-accelerated operations.
### [Storage Engine](storage-engine.md)
Lance integration, LSM design, and the L0/L1/L2 layer architecture.
### [Query Planning](query-planning.md)
Planner internals, optimization passes, and physical plan generation.
### [Query Rewriting](query-rewriting.md)
Function-to-predicate transformations, rewrite rules, and predicate pushdown optimization.
### [Benchmarks](benchmarks.md)
Performance measurements, methodology, and comparison data.
Implementation Overview¶
Uni's internals are organized into four major subsystems:
Query Processing¶
- Parser — Cypher syntax to AST (based on sqlparser)
- Rewriter — Function-to-predicate transformations (compile-time)
- Planner — Logical plan with optimization passes
- Executor — Vectorized physical operators
Runtime¶
- L0 Buffer — In-memory SimpleGraph graph for mutations
- CSR Cache — Compressed adjacency for O(1) traversal
- Property Manager — Lazy loading from Lance
Storage¶
- Lance Datasets — Columnar storage with versioning
- WAL — Write-ahead log for durability
- Indexes — Vector (HNSW/IVF_PQ), scalar (BTree)
Object Store¶
- object_store crate for S3/GCS/Azure/local
- Local caching for frequently accessed data
- Manifest files for snapshot isolation
Key Design Decisions¶
| Decision | Rationale |
|---|---|
| Vectorized execution | 100-500x faster than row-at-a-time |
| Lance for storage | Native vector indexes + versioning |
| SimpleGraph for in-memory | Fast graph algorithms in Rust |
| Single-writer model | Simplicity over distributed complexity |
| Query rewriting | Compile-time optimization for predicate pushdown |
Next Steps¶
Start with Vectorized Execution to understand how queries are processed.