Skip to content

sql: remove plan node visitor and observer#143503

Merged
craig[bot] merged 5 commits intocockroachdb:masterfrom
mgartner:plan-node-set-input
Mar 26, 2025
Merged

sql: remove plan node visitor and observer#143503
craig[bot] merged 5 commits intocockroachdb:masterfrom
mgartner:plan-node-set-input

Conversation

@mgartner
Copy link
Copy Markdown
Contributor

@mgartner mgartner commented Mar 26, 2025

sql: add SetInput method to planNode interface

The SetInput method has been added to the planNode interface. It will
be used in future commits.

Release note: None

sql: use planNode methods to replace unwrapped planNodes

The (*planNodeToRowSource).SetInput method now uses the InputCount,
Input, and SetInput methods of planNode, instead of walkPlan, to
traverse and replace nodes in the plan node tree. This continues the
effort to deprecate and remove the plan node walkers (see #137620 for
more details on the motivation for this).

Release note: None

sql: use planNode methods to traverse CDC planNodes

CDC plan node trees that previously used plan visitors and observers now
use the InputCount, Input, and SetInput methods of the planNode
interface to traverse and manipulate the plan node tree. This continues
the effort to deprecate and remove the plan node walkers (see #137620
for more details on the motivation for this).

Release note: None

sql: remove unused planVisitor and planObserver

Release note: None

sql: rename walk.go to plan_names.go

This file has been renamed to reflect that it no longer contains any
logic for walking plan node trees. It only contains logic related to
plan node names.

Epic: None
Release note: None

The `SetInput` method has been added to the planNode interface. It will
be used in future commits.

Release note: None
The `(*planNodeToRowSource).SetInput` method now uses the `InputCount`,
`Input`, and `SetInput` methods of `planNode`, instead of `walkPlan`, to
traverse and replace nodes in the plan node tree. This continues the
effort to deprecate and remove the plan node walkers (see cockroachdb#137620 for
more details on the motivation for this).

Release note: None
CDC plan node trees that previously used plan visitors and observers now
use the `InputCount`, `Input`, and `SetInput` methods of the `planNode`
interface to traverse and manipulate the plan node tree. This continues
the effort to deprecate and remove the plan node walkers (see cockroachdb#137620
for more details on the motivation for this).

Release note: None
This file has been renamed to reflect that it no longer contains any
logic for walking plan node trees. It only contains logic related to
plan node names.

Release note: None
@mgartner mgartner requested review from a team and yuzefovich March 26, 2025 17:20
@mgartner mgartner requested review from a team as code owners March 26, 2025 17:20
@mgartner mgartner requested review from andyyang890 and removed request for a team March 26, 2025 17:20
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Member

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 :lgtm:

Reviewed 8 of 8 files at r1, 1 of 1 files at r2, 3 of 3 files at r3, 1 of 1 files at r4, 2 of 2 files at r5, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @andyyang890)

@mgartner
Copy link
Copy Markdown
Contributor Author

Thanks for being my review partner on this journey @yuzefovich!

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Mar 26, 2025

Build failed (retrying...):

@craig craig bot merged commit 4aacb91 into cockroachdb:master Mar 26, 2025
24 checks passed
@craig
Copy link
Copy Markdown
Contributor

craig bot commented Mar 26, 2025

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants