https://github.com/arclabs561/qplan
Query planning primitives
https://github.com/arclabs561/qplan
query-planning rust
Last synced: about 1 month ago
JSON representation
Query planning primitives
- Host: GitHub
- URL: https://github.com/arclabs561/qplan
- Owner: arclabs561
- License: apache-2.0
- Created: 2026-01-27T19:30:33.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2026-06-10T17:47:30.000Z (about 1 month ago)
- Last Synced: 2026-06-10T18:13:01.689Z (about 1 month ago)
- Topics: query-planning, rust
- Language: Rust
- Homepage: https://docs.rs/qplan
- Size: 18.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
- Security: SECURITY.md
Awesome Lists containing this project
README
# qplan
Compile typed query expressions (`qexpr`) into execution-friendly query plans.
This crate is intentionally narrow today: it supports compiling a subset of `QExpr`
into a conjunctive plan (`AND` of terms/phrases/near constraints). Unsupported operators
return explicit errors so downstream systems can choose a fallback.
## Usage
```toml
[dependencies]
qplan = { git = "https://github.com/arclabs561/qplan" }
```
Example:
```rust
use qexpr::{Phrase, QExpr, Term};
use qplan::compile_conjunctive;
let q = QExpr::And(vec![
QExpr::Term(Term::new("alpha")),
QExpr::Phrase(Phrase::new(vec![Term::new("new"), Term::new("york")])),
]);
let p = compile_conjunctive(&q).unwrap();
assert!(!p.bag_terms.is_empty());
```
## Development
```bash
cargo test
```