pub fn plan_query(
cells: Vec<CellInfo>,
nodes: Vec<NodeInfo>,
local_node_id: &NodeId,
) -> Result<QueryPlan>Expand description
Plan a query: decide whether to execute locally or distribute across nodes.
§Strategy
- If all cells fit in one bee’s memory budget and we have an idle bee, run locally
- Otherwise, assign cells to nodes using cache locality and capacity
- Apply leafcutter sizing: split assignments that exceed a bee’s budget