-
Notifications
You must be signed in to change notification settings - Fork 590
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Richard Chien <[email protected]>
- Loading branch information
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# https://github.com/risingwavelabs/risingwave/issues/17263 | ||
|
||
statement ok | ||
create table t (a int, b int); | ||
|
||
statement ok | ||
create function add(a int, b int) returns int language python as $$ | ||
def add(a, b): | ||
return a+b | ||
$$; | ||
|
||
statement ok | ||
create materialized view mv as select add(a, b) as c from t; | ||
|
||
statement error | ||
drop function add; | ||
---- | ||
db error: ERROR: Failed to run the query | ||
|
||
Caused by: | ||
Permission denied: PermissionDenied: function used by 1 other objects. | ||
|
||
|
||
statement ok | ||
drop materialized view mv; | ||
|
||
statement ok | ||
drop function add; | ||
|
||
|
||
statement ok | ||
create function add(a int, b int) returns int language python as $$ | ||
def add(a, b): | ||
return a+b | ||
$$; | ||
|
||
statement ok | ||
create sink s as select add(a, b) as c from t with (connector = 'blackhole'); | ||
|
||
statement error | ||
drop function add; | ||
---- | ||
db error: ERROR: Failed to run the query | ||
|
||
Caused by: | ||
Permission denied: PermissionDenied: function used by 1 other objects. | ||
|
||
statement ok | ||
drop sink s; | ||
|
||
statement ok | ||
drop function add; | ||
|
||
statement ok | ||
drop table t; |