Skip to content
This repository was archived by the owner on Dec 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
2b6ce6c
Reorg src dir for optimizer
AlSchlo May 7, 2025
32b5601
Add optimizer files
AlSchlo May 7, 2025
32efa8a
Migrate memo types and interfaces (#102)
connortsui20 May 7, 2025
ac99222
Make compile
AlSchlo May 7, 2025
adabaa0
Add missing files
AlSchlo May 7, 2025
946ba74
Make all compile
AlSchlo May 7, 2025
57da3d3
Don't forget missing file
AlSchlo May 7, 2025
9563511
Adapt job executors and add task casters
AlSchlo May 8, 2025
3df4239
Cleanup
AlSchlo May 8, 2025
ec73d00
Add retriever
AlSchlo May 9, 2025
f848ee0
Implement fork logical handler
AlSchlo May 9, 2025
9387646
implement ensure group explore
AlSchlo May 9, 2025
3308cc5
launch jobs
AlSchlo May 9, 2025
1ffebc1
implement ensure goal mvp for log to log
AlSchlo May 9, 2025
b3c7c92
redo memo
AlSchlo May 9, 2025
ba895ff
Reboot memo implementation
AlSchlo May 9, 2025
85c408d
reorg and implement materialize and repr in memeo
AlSchlo May 9, 2025
3bb5a23
get props implemented
AlSchlo May 9, 2025
0f9327a
simplify memo result kiss
AlSchlo May 9, 2025
1df45a7
impl get all logical exprs
AlSchlo May 9, 2025
a143153
impl create group
AlSchlo May 9, 2025
30cf54f
add doc, index, and impl find logical
AlSchlo May 9, 2025
c8b598e
start merge impl
AlSchlo May 9, 2025
783d46b
Make materialized exprs and goals repr
AlSchlo May 10, 2025
f6a21e3
impl merge groups
AlSchlo May 10, 2025
81e2b26
merge works and add tests
AlSchlo May 10, 2025
1448c4a
big memo refactor
AlSchlo May 10, 2025
e4f845b
consolidate merge results
AlSchlo May 10, 2025
8cf416b
add more merge tests
AlSchlo May 10, 2025
4035c4d
add cascading merge test
AlSchlo May 10, 2025
5624fc6
Add extra memo test
AlSchlo May 11, 2025
bb5ee02
Fix memo fuzzing tests
AlSchlo May 11, 2025
4bf6104
update todo list task and remove useless functions
AlSchlo May 12, 2025
c8466d8
start task graph merge
AlSchlo May 12, 2025
dea8f8d
add missing file
AlSchlo May 12, 2025
4fc1e5e
refactor task merge and add consolidation step
AlSchlo May 12, 2025
91ee670
finish merge
AlSchlo May 12, 2025
b21478b
simplify task ir and remove notion of uncompleted
AlSchlo May 12, 2025
eeb873b
generate missing doc
AlSchlo May 12, 2025
ab5561e
address most of clippy
AlSchlo May 13, 2025
89ded5d
replace with faster hashmap and set in optimizer (hashbrown)
AlSchlo May 13, 2025
ba8a27d
add logical channel to result
AlSchlo May 13, 2025
59a3015
remove logical channel
AlSchlo May 13, 2025
a9848b7
Add missing file
AlSchlo May 13, 2025
ecca9bd
increase engine stack size
AlSchlo May 13, 2025
7302a40
Associated Error Types (#104)
connortsui20 May 13, 2025
6b347db
Add * handling and make tutorial compile
AlSchlo May 13, 2025
55a8e76
add * stored type handling and tests
AlSchlo May 13, 2025
b492c2b
merge
AlSchlo May 13, 2025
0dfb321
address connor's nits
AlSchlo May 13, 2025
e74d1b9
Merge branch 'main' into alexis/optimizer
connortsui20 May 13, 2025
b10b985
replace debug asserts into asserts
AlSchlo May 13, 2025
92f66bc
Merge branch 'alexis/optimizer' of github.com:cmu-db/optd into alexis…
AlSchlo May 13, 2025
e101300
union instead of extend
AlSchlo May 13, 2025
c075611
rename get ref to take ref
AlSchlo May 13, 2025
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
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@
# optd

Query Optimizer Service

TODO:

1. Merge results
2. Handle * for retrieve properties. (nice testground) -> DOES NOT NEED CHANGE IN CIR?? Get all expr, just add group id in it.
12 changes: 9 additions & 3 deletions optd-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ use optd::dsl::analyzer::hir::{CoreData, HIR, Udf, Value};
use optd::dsl::compile::{Config, compile_hir};
use optd::dsl::engine::{Continuation, Engine, EngineResponse};
use optd::dsl::utils::errors::{CompileError, Diagnose};
use optd::dsl::utils::retriever::{MockRetriever, Retriever};
use std::collections::HashMap;
use std::sync::Arc;
use tokio::runtime::Runtime;
Expand All @@ -66,7 +67,11 @@ enum Commands {
}

/// A unimplemented user-defined function.
pub fn unimplemented_udf(_args: &[Value], _catalog: &dyn Catalog) -> Value {
pub fn unimplemented_udf(
_args: &[Value],
_catalog: &dyn Catalog,
_retriever: &dyn Retriever,
) -> Value {
println!("This user-defined function is unimplemented!");
Value::new(CoreData::<Value>::None)
}
Expand Down Expand Up @@ -139,10 +144,11 @@ fn run_all_functions(hir: &HIR) -> Result<(), Vec<CompileError>> {

async fn run_functions_in_parallel(hir: &HIR, functions: Vec<String>) -> Vec<FunctionResult> {
let catalog = Arc::new(memory_catalog());
let retriever = Arc::new(MockRetriever::new());
let mut set = JoinSet::new();

for function_name in functions {
let engine = Engine::new(hir.context.clone(), catalog.clone());
let engine = Engine::new(hir.context.clone(), catalog.clone(), retriever.clone());
let name = function_name.clone();

set.spawn(async move {
Expand All @@ -151,7 +157,7 @@ async fn run_functions_in_parallel(hir: &HIR, functions: Vec<String>) -> Vec<Fun
Arc::new(|value| Box::pin(async move { value }));

// Launch the function with an empty vector of arguments.
let result = engine.launch_rule(&name, vec![], result_handler).await;
let result = engine.launch(&name, vec![], result_handler).await;
FunctionResult { name, result }
});
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 0 additions & 7 deletions optd/src/core/error.rs

This file was deleted.

Loading