Skip to main content

oxidelake_compute/
lib.rs

1//! Physical operators (docs/SPEC.md §2.3): the `Gpu*Exec` DataFusion
2//! `ExecutionPlan`s, the backend-agnostic [`GpuOperator`] that runs each batch
3//! on the local backend with CPU fallback, and the conformance suite (in
4//! `tests/`) that pins every operator to the stock DataFusion semantics.
5//!
6//! * [`GpuFilterExec`] — fused filter + projection
7//! * [`GpuHashJoinExec`] — inner hash join on one `Int64` key
8//! * [`GpuAggregateExec`] — `SUM/COUNT/MIN/MAX` grouped by one `Int64` key
9//! * [`GpuVectorDistanceExec`] — L2 / cosine distance column
10//!
11//! Every exec records the *planned* backend (its `EXPLAIN` tag) but selects the
12//! *real* backend at `execute()` time from the local hardware detector, so a
13//! plan shipped to a machine without a GPU still runs correctly.
14//!
15//! Dependency direction: depends on `oxidelake-core`, `oxidelake-memory`, `oxidelake-device`.
16
17pub mod backend;
18pub mod display;
19pub mod exec;
20pub mod operator;
21pub mod udf;
22
23pub use backend::local_backend;
24pub use exec::{
25    GpuAggregateExec, GpuFilterExec, GpuHashJoinExec, GpuVectorDistanceExec,
26    aggregate_output_schema,
27};
28pub use operator::{GpuOperator, JoinBuild};
29pub use oxidelake_core::params;
30pub use oxidelake_core::params::{
31    AggregateFunction, AggregateSpec, Comparison, DistanceMetric, Literal, Predicate,
32    gpu_eligible_scalar, vector_dimension,
33};
34#[cfg(feature = "predict")]
35pub mod predict;
36#[cfg(feature = "predict")]
37pub use predict::{Model, ModelSpec, PREDICT, predict_udf};
38
39pub use udf::{
40    COSINE_DISTANCE, L2_DISTANCE, cosine_distance_udf, distance_metric_for, distance_udf_name,
41    l2_distance_udf, literal_query, oxide_udfs, query_literal,
42};