Repository navigation
Closed
Labels
area/optimizerattention/refactor-relatedkind/subtaskseverity/s0Active / top priority for current sprint. Owner has committed to working on it now.
Description
Parent issue
Objective
Perform the final cutover only after every reachable UPDATE route has a modern, named-specialized, or explicit-error disposition and the observation window shows no unexplained legacy use.
Required work
- Remove the generic
ErrUnsupportedDML -> buildTableUpdatebranch frombindAndOptimizeUpdateQuery. - Delete
buildTableUpdateafter repository call-graph proof that it has no caller. - Remove helpers and branches only when they are UPDATE-specific and unreachable.
- Preserve shared INSERT, DELETE, LOAD, REPLACE, FK-recursion, and index-maintenance utilities in
build_dml_util.goand elsewhere. - Audit
PreInsert UniqueKey/PreInsert SecondaryKeyconsumers. Remove UPDATE-specific Rowid behavior only if no remaining non-UPDATE plan depends on it; do not delete shared operators based on name alone. - Port valuable legacy behavior tests to modern plan/SQL tests before deleting implementation-coupled assertions.
- Add a regression guard that prevents reintroduction of a generic UPDATE fallback.
Entry criteria
- [Bug]: nullable index UPDATE keeps Rowid from filtered NULL row #26334 is fixed and covered by real SQL plus operator regression tests.
- [Subtask]: Inventory and instrument legacy UPDATE planner fallbacks #26337 classifies every route and the unknown-route guard is active.
- [Subtask]: Move child-side foreign-key UPDATE validation to MULTI_UPDATE #26338 and [Subtask]: Move parent-side FK referential actions to MULTI_UPDATE #26339 complete FK routing/semantics.
- [Subtask]: Move multi-target UPDATE semantics to MULTI_UPDATE #26340 completes multi-target UPDATE.
- [Subtask]: Move synchronous irregular-index UPDATE maintenance to the modern planner #26341 completes synchronous irregular-index migration and async disposition.
- [Subtask]: Migrate remaining legacy UPDATE special cases or reject them explicitly #26342 resolves every remaining special/error case.
- The agreed regression/soak window reports zero
buildTableUpdateexecutions and zero unknown routes.
Acceptance criteria
-
bindAndOptimizeUpdateQuerycontains no generic call tobuildTableUpdate. -
buildTableUpdatehas no caller and is deleted. - Shared DML code remains unless independent call-graph/test evidence proves it dead.
- No normal-table UPDATE plan contains legacy UPDATE-only
PRE_INSERT_UK/PRE_INSERT_SKstaging; modern and named-specialized controls are asserted separately. - Every supported UPDATE form produces
MULTI_UPDATEor an explicitly named specialized plan. - Every unsupported form fails before mutation with a stable error.
- Planner comments/docs and route telemetry no longer describe the legacy UPDATE planner as active.
- Targeted
pkg/sql/plan, affected colexec/index-plugin packages, and distributed UPDATE/FK/index suites pass. - Required repository CI passes, including optimistic/pessimistic conflict/retry, cancellation, and rollback coverage for migrated routes.
- A source-level or plan-test guard fails if a future arbitrary
ErrUnsupportedDMLis routed to a legacy UPDATE builder.
Deletion checklist
- Produce a before/after call graph for
buildTableUpdateand candidate helpers. - Classify each candidate as UPDATE-only, shared, or still reachable.
- Port behavior tests before deleting legacy-only tests.
- Verify no orphaned protobuf node handling, explain formatting, metrics, or comments remain.
- Verify [Bug]: nullable index UPDATE keeps Rowid from filtered NULL row #26334's fix is retained even if its UPDATE-specific code later becomes removable; other DML consumers must remain safe.
Dependencies
- Parent: [Task]: Retire the legacy UPDATE planner and converge on MULTI_UPDATE #26336
- Final integration task; blocked by [Bug]: nullable index UPDATE keeps Rowid from filtered NULL row #26334 and [Subtask]: Inventory and instrument legacy UPDATE planner fallbacks #26337–[Subtask]: Migrate remaining legacy UPDATE special cases or reject them explicitly #26342.
Metadata
Metadata
Assignees
Labels
area/optimizerattention/refactor-relatedkind/subtaskseverity/s0Active / top priority for current sprint. Owner has committed to working on it now.
Activity
refactor(plan): remove legacy UPDATE planner (#27482)
refactor(plan): remove legacy UPDATE planner (matrixorigin#27482)
refactor(plan): remove legacy UPDATE planner (matrixorigin#27482)
refactor(plan): remove legacy UPDATE planner (matrixorigin#27482)