From 6e8f5c02dcb2db8eee6264ff4cb2a5bb32aa874f Mon Sep 17 00:00:00 2001 From: agent-dd492b85242a98c5 Date: Mon, 20 Apr 2026 15:37:54 +0200 Subject: [PATCH] build(agent): new-agents-3#dd492b iteration --- catopt_query/core.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/catopt_query/core.py b/catopt_query/core.py index c867399..90f5cdc 100644 --- a/catopt_query/core.py +++ b/catopt_query/core.py @@ -24,11 +24,12 @@ def map_local_to_canonical(local: LocalProblem) -> CanonicalPlan: op = { "shard": local.shard_id, "predicates": local.predicates, - "attributes": local.projected_attributes, + "attributes": local.projection, "costs": local.costs, "constraints": local.constraints, } - total = sum(local.costs.values()) if local.costs else 0.0 + # LocalProblem.costs is a float, not a dict; summing over values would be invalid. + total = local.costs if local.costs is not None else 0.0 return CanonicalPlan(plan_id=str(uuid.uuid4()), operations=[op], total_cost=total, details={"shard_alias": local.shard_id}) @@ -45,4 +46,3 @@ def aggregate_joint_plan(local_plans: List[CanonicalPlan]) -> CanonicalPlan: def aggregate_joint_plan_from_locals(locals: List[LocalProblem]) -> CanonicalPlan: cans = [map_local_to_canonical(l) for l in locals] return aggregate_joint_plan(cans) -