Skip to content

Commit

Permalink
sql: remove unused dropOwnedByNode
Browse files Browse the repository at this point in the history
`DROP OWNED BY` is supported only in the declarative schema changer and
`dropOwnedByNode` is not used, so it has been removed.

Release note: None
  • Loading branch information
mgartner committed Dec 19, 2024
1 parent 5d3823e commit abbbbc2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
15 changes: 0 additions & 15 deletions pkg/sql/drop_owned_by.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,10 @@ import (
"context"

"github.com/cockroachdb/cockroach/pkg/server/telemetry"
"github.com/cockroachdb/cockroach/pkg/sql/sem/tree"
"github.com/cockroachdb/cockroach/pkg/sql/sqltelemetry"
"github.com/cockroachdb/cockroach/pkg/util/errorutil/unimplemented"
)

// dropOwnedByNode represents a DROP OWNED BY <role(s)> statement.
type dropOwnedByNode struct {
// TODO(angelaw): Uncomment when implementing - commenting out due to linting error.
//n *tree.DropOwnedBy
}

func (p *planner) DropOwnedBy(ctx context.Context) (planNode, error) {
if err := checkSchemaChangeEnabled(
ctx,
Expand All @@ -32,11 +25,3 @@ func (p *planner) DropOwnedBy(ctx context.Context) (planNode, error) {
// TODO(angelaw): Implementation.
return nil, unimplemented.NewWithIssue(55381, "drop owned by is not yet implemented")
}

func (n *dropOwnedByNode) startExec(params runParams) error {
// TODO(angelaw): Implementation.
return nil
}
func (n *dropOwnedByNode) Next(runParams) (bool, error) { return false, nil }
func (n *dropOwnedByNode) Values() tree.Datums { return tree.Datums{} }
func (n *dropOwnedByNode) Close(context.Context) {}
1 change: 0 additions & 1 deletion pkg/sql/walk.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,6 @@ var planNodeNames = map[reflect.Type]string{
reflect.TypeOf(&ordinalityNode{}): "ordinality",
reflect.TypeOf(&projectSetNode{}): "project set",
reflect.TypeOf(&reassignOwnedByNode{}): "reassign owned by",
reflect.TypeOf(&dropOwnedByNode{}): "drop owned by",
reflect.TypeOf(&recursiveCTENode{}): "recursive cte",
reflect.TypeOf(&refreshMaterializedViewNode{}): "refresh materialized view",
reflect.TypeOf(&relocateNode{}): "relocate",
Expand Down

0 comments on commit abbbbc2

Please sign in to comment.