github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/sql/drop_type.go (about) 1 // Copyright 2020 The Cockroach Authors. 2 // 3 // Use of this software is governed by the Business Source License 4 // included in the file licenses/BSL.txt. 5 // 6 // As of the Change Date specified in that file, in accordance with 7 // the Business Source License, use of this software will be governed 8 // by the Apache License, Version 2.0, included in the file 9 // licenses/APL.txt. 10 11 package sql 12 13 import ( 14 "context" 15 16 "github.com/cockroachdb/cockroach/pkg/sql/sem/tree" 17 "github.com/cockroachdb/cockroach/pkg/util/errorutil/unimplemented" 18 "github.com/cockroachdb/errors" 19 ) 20 21 type dropTypeNode struct { 22 n *tree.DropType 23 } 24 25 // Use to satisfy the linter. 26 var _ planNode = &dropTypeNode{n: nil} 27 28 func (p *planner) DropType(ctx context.Context, n *tree.DropType) (planNode, error) { 29 return nil, unimplemented.NewWithIssue(27793, "DROP TYPE") 30 } 31 32 func (n *dropTypeNode) startExec(params runParams) error { 33 return errors.AssertionFailedf( 34 "should not be calling startExec on DROP TYPE node", 35 ) 36 } 37 38 func (n *dropTypeNode) Next(params runParams) (bool, error) { return false, nil } 39 func (n *dropTypeNode) Values() tree.Datums { return tree.Datums{} } 40 func (n *dropTypeNode) Close(ctx context.Context) {} 41 func (n *dropTypeNode) ReadingOwnWrites() {}