Skip to content

[Refactor] Rename data structures and functions to be clearer #427

Description

@milindsrivastava1997

What to build

Rename overloaded planner abstractions so each name identifies the concept it represents, rather than reusing terms such as "bind," "implementation," and "boundary" across unrelated stages.

Current Proposed Reason
Implementation Realization A candidate physical form, not source-code implementation.
implementations_for_with realizations_for_intent Enumerates ranked physical alternatives for an AggIntent.
Binder / bind SchemaResolver / resolve_schema This pass derives schema and resolves column names.
PanePhaseBinding PaneLayout Records pane width and origin; does not bind a plan.
BoundaryCoverage WindowEdgeCoverage Describes coverage of partial panes at query-window edges.
ExactBoundaryResidual ExactWindowEdgeResidual States which boundary the residual covers.
BoundaryKind PhysicalHandoffKind Covers network transfer and materialization handoffs.
BoundaryResources PhysicalHandoffBytes Byte counters associated with physical handoffs.
boundary_cost physical_handoff_cost Costs those physical handoffs.
"comparison boundary" "comparison scope" Align documentation with the existing ComparisonScope type.
downstream "boundary" "planner-runtime contract" The document defines ownership and exchanged contracts.
internal Models CandidatePlanningInputs Holds cost, accuracy, allocation, and evidence inputs.
with_models new_with_planning_inputs Makes the injected dependencies explicit.
with_models_and_evidence new_with_planning_inputs_and_evidence Same, while distinguishing evidence-bearing construction.

Keep with_* where it is an ordinary fluent builder (with_table, with_update_rate, etc.), and retain IN, WITH, and without where they directly represent SQL or PromQL syntax.

Acceptance criteria

  • The logical-to-summary candidate vocabulary uses Realization consistently.
  • Schema/name resolution has a single distinct naming family.
  • Physical transfers/materialization and query-window edges no longer share the generic boundary name.
  • Documentation uses comparison scope and planner-runtime contract for their respective concepts.
  • Public renames include migration notes or compatibility aliases where needed.
  • Focused tests and documentation links are updated.

Blocked by

None - can start immediately.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions