MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / try_plan_join

Function try_plan_join

nodedb-sql/src/planner/select/select_stmt.rs:429–444  ·  view source on GitHub ↗

Dispatch to the JOIN planner if the FROM contains joins.

(
    select: &Select,
    scope: &TableScope,
    catalog: &dyn SqlCatalog,
    functions: &FunctionRegistry,
    temporal: TemporalScope,
)

Source from the content-addressed store, hash-verified

427
428/// Dispatch to the JOIN planner if the FROM contains joins.
429fn try_plan_join(
430 select: &Select,
431 scope: &TableScope,
432 catalog: &dyn SqlCatalog,
433 functions: &FunctionRegistry,
434 temporal: TemporalScope,
435) -> Result<Option<SqlPlan>> {
436 if select.from.len() != 1 {
437 return Ok(None);
438 }
439 let from = &select.from[0];
440 if from.joins.is_empty() {
441 return Ok(None);
442 }
443 crate::planner::join::plan_join_from_select(select, scope, catalog, functions, temporal)
444}

Callers 1

plan_selectFunction · 0.85

Calls 3

plan_join_from_selectFunction · 0.85
lenMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected