Skip to content

Commit

Permalink
refactor(core): separate cost model and stat estimation (#209)
Browse files Browse the repository at this point in the history
part of #195

* also refactors the adv-cost crate to purely support cardinality
estimation
* rewrite optimize input task to reduce dead code (which might have some
effect on the plan output?)
* use `cargo run -p optd-sqlplannertest --bin planner_test_apply --
--enable-advanced-cost-model` to experiment with the advanced cost model

---------

Signed-off-by: Alex Chi <[email protected]>
  • Loading branch information
skyzh authored Nov 3, 2024
1 parent 4c8f4b4 commit 29647f2
Show file tree
Hide file tree
Showing 39 changed files with 1,002 additions and 1,022 deletions.
145 changes: 145 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion datafusion-optd-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use datafusion_optd_cli::{
use mimalloc::MiMalloc;
use optd_datafusion_bridge::{DatafusionCatalog, OptdQueryPlanner};
use optd_datafusion_repr::DatafusionOptimizer;
use optd_datafusion_repr_adv_cost::adv_cost::stats::BaseTableStats;
use optd_datafusion_repr_adv_cost::adv_stats::stats::BaseTableStats;
use std::collections::HashMap;
use std::env;
use std::path::Path;
Expand Down
3 changes: 2 additions & 1 deletion optd-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ anyhow = "1"
tracing = "0.1"
ordered-float = "4"
itertools = "0.11"
serde = {version = "1.0", features = ["derive", "rc"]}
serde = { version = "1.0", features = ["derive", "rc"] }
arrow-schema = "47.0.0"
chrono = "0.4"
value-bag = { version = "1", features = ["owned"] }
Loading

0 comments on commit 29647f2

Please sign in to comment.