From 71a55b2b8f1b7bfc923509f1337f37a234266e0c Mon Sep 17 00:00:00 2001 From: zz_y Date: Tue, 21 Jul 2026 20:22:36 -0600 Subject: [PATCH] feat(plan): expose bind::logical for deployment-forced fallback A deployment sometimes knows implement_tree_in_with would otherwise actively bind a node to an Implementation it can't actually serve (e.g. an accumulator kind the deployment's runtime doesn't implement yet) -- it needs to force that one node through the same Logical fallback this crate's own dispatch uses, without duplicating the schema-lift plumbing. Widen logical()'s visibility to make that possible. Co-Authored-By: Claude Sonnet 5 --- crates/plan/src/bind.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/crates/plan/src/bind.rs b/crates/plan/src/bind.rs index 87df6de7..eb407c0a 100644 --- a/crates/plan/src/bind.rs +++ b/crates/plan/src/bind.rs @@ -222,8 +222,13 @@ fn readout(intent: &AggIntent, col: &ColumnRef) -> SketchQuery { } /// Wrap an unrewritten L3 subtree, lifting its schema with every column -/// `L4DataType::Primitive`. -fn logical(expr: &QueryExpr, scope: &BindingScope) -> Result, ImplementError> { +/// `L4DataType::Primitive`. Public so a deployment can force a node it +/// knows `implement_tree_in_with` would otherwise actively (mis)bind — +/// e.g. an intent this crate's `boundary::implementation_for` maps to an +/// accumulator kind the deployment's runtime doesn't actually implement — +/// through the same fallback this crate's own dispatch uses, without +/// duplicating the schema-lift logic. +pub fn logical(expr: &QueryExpr, scope: &BindingScope) -> Result, ImplementError> { let schema = expr.output_schema_in(scope)?; Ok(Rc::new(L4Node { expr: SummaryExpr::Logical(Box::new(expr.clone())),