pub mod array;
pub mod cluster_array;
pub mod columnar;
pub mod crdt;
pub mod document;
pub mod graph;
pub mod kv;
pub mod meta;
pub mod query;
pub mod spatial;
pub mod text;
pub mod timeseries;
pub mod vector;
pub mod wire;
pub use array::{ArrayBinaryOp, ArrayOp, ArrayReducer};
pub use cluster_array::ClusterArrayOp;
pub use columnar::{ColumnarInsertIntent, ColumnarOp};
pub use crdt::CrdtOp;
pub use document::{
BalancedDef, DocumentOp, EnforcementOptions, GeneratedColumnSpec, MaterializedSumBinding,
PeriodLockConfig, RegisteredIndex, RegisteredIndexState, ReturningColumns, ReturningItem,
ReturningSpec, StorageMode, UpdateValue,
};
pub use graph::{BatchEdge, GraphOp};
pub use kv::KvOp;
pub use meta::MetaOp;
pub use query::{AggregateSpec, JoinProjection, QueryOp};
pub use spatial::{SpatialOp, SpatialPredicate};
pub use text::TextOp;
pub use timeseries::TimeseriesOp;
pub use vector::VectorOp;
pub use wire::{decode, encode};
#[derive(
Debug,
Clone,
PartialEq,
serde::Serialize,
serde::Deserialize,
zerompk::ToMessagePack,
zerompk::FromMessagePack,
)]
pub enum PhysicalPlan {
Vector(VectorOp),
Graph(GraphOp),
Document(DocumentOp),
Kv(KvOp),
Text(TextOp),
Columnar(ColumnarOp),
Timeseries(TimeseriesOp),
Spatial(SpatialOp),
Crdt(CrdtOp),
Query(QueryOp),
Meta(MetaOp),
Array(ArrayOp),
ClusterArray(ClusterArrayOp),
}
impl PhysicalPlan {
pub fn is_broadcast_scan(&self) -> bool {
matches!(
self,
PhysicalPlan::Document(DocumentOp::Scan { .. })
| PhysicalPlan::Columnar(ColumnarOp::Scan { .. })
| PhysicalPlan::Query(QueryOp::Aggregate { .. })
| PhysicalPlan::Query(QueryOp::PartialAggregate { .. })
| PhysicalPlan::Graph(GraphOp::Hop { .. })
| PhysicalPlan::Graph(GraphOp::Neighbors { .. })
| PhysicalPlan::Graph(GraphOp::NeighborsMulti { .. })
| PhysicalPlan::Graph(GraphOp::Path { .. })
| PhysicalPlan::Graph(GraphOp::Subgraph { .. })
| PhysicalPlan::Graph(GraphOp::RagFusion { .. })
| PhysicalPlan::Graph(GraphOp::Match { .. })
| PhysicalPlan::Graph(GraphOp::TemporalNeighbors { .. })
| PhysicalPlan::Graph(GraphOp::TemporalAlgorithm { .. })
| PhysicalPlan::Vector(VectorOp::Search { .. })
| PhysicalPlan::Text(TextOp::Search { .. })
| PhysicalPlan::Text(TextOp::HybridSearch { .. })
| PhysicalPlan::Text(TextOp::HybridSearchTriple { .. })
| PhysicalPlan::Text(TextOp::BM25ScoreScan { .. })
)
}
}