oxidelake_planner/lib.rs
1//! Planning (docs/SPEC.md §2.5): the [`HardwarePlacementRule`] — a DataFusion
2//! `PhysicalOptimizerRule` that rewrites eligible `FilterExec` /
3//! `ProjectionExec` / `HashJoinExec` / `AggregateExec` nodes into `Gpu*Exec`
4//! nodes — and the [`OxidePhysicalCodec`], a `PhysicalExtensionCodec` that lets
5//! Ballista ship those nodes to executors.
6//!
7//! Placement is decided against a *target* backend: the local hardware in
8//! embedded mode, the declared cluster capability (`OXIDE_CLUSTER_BACKEND`) on
9//! the Ballista scheduler. `EXPLAIN` shows the target as a tag, e.g.
10//! `GpuFilterExec[cuda]`; every node still selects its real backend at
11//! execute time and falls back to the CPU path when the device is absent.
12//!
13//! Dependency direction: depends on `oxidelake-core`, `oxidelake-compute` and
14//! `datafusion-proto` (the single `datafusion-*` sub-crate exception, ADR-0009).
15
16pub mod codec;
17pub mod rule;
18pub mod target;
19
20pub use codec::OxidePhysicalCodec;
21pub use rule::{HardwarePlacementRule, VectorDistancePlacementRule, physical_optimizer_rules};
22pub use target::{CLUSTER_TARGET_ENV, cluster_target_from_env, resolve_cluster_target};