Skip to content

Commit

Permalink
sql: link issue to unimplemented mutations in udfs
Browse files Browse the repository at this point in the history
Links an issue to the unimplemented errors for mutations in UDFs.

Epic: None
Informs: cockroachdb#87289
Fixes: cockroachdb#99715

Release note: None

Release justification: Changes an existing error message, so change is
not risky.
  • Loading branch information
rharding6373 committed Apr 10, 2023
1 parent 71a94e5 commit 3b645ad
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/sql/opt/optbuilder/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,13 @@ func (b *Builder) buildStmt(
if b.insideFuncDef {
switch stmt := stmt.(type) {
case *tree.Select:
case tree.SelectStatement:
case *tree.Delete:
panic(unimplemented.NewWithIssuef(87289, "%s usage inside a function definition", stmt.StatementTag()))
case *tree.Insert:
panic(unimplemented.NewWithIssuef(87289, "%s usage inside a function definition", stmt.StatementTag()))
case *tree.Update:
panic(unimplemented.NewWithIssuef(87289, "%s usage inside a function definition", stmt.StatementTag()))
default:
panic(unimplemented.Newf("user-defined functions", "%s usage inside a function definition", stmt.StatementTag()))
}
Expand Down

0 comments on commit 3b645ad

Please sign in to comment.