Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/risingwavelabs/risingwave i…
Browse files Browse the repository at this point in the history
…nto wcy/bump_opendal_to_v0.51.pr
  • Loading branch information
wcy-fdu committed Jan 10, 2025
2 parents 5a69949 + e6e9ace commit e010cb5
Show file tree
Hide file tree
Showing 29 changed files with 559 additions and 134 deletions.
3 changes: 3 additions & 0 deletions e2e_test/sink/elasticsearch/elasticsearch_sink.slt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ CREATE TABLE test_route (

statement ok
CREATE SINK test_route_sink from test_route WITH (
type = 'upsert',
connector = 'elasticsearch',
index = 'test_route',
url = 'http://elasticsearch:9200',
Expand All @@ -32,6 +33,7 @@ CREATE SINK test_route_sink from test_route WITH (

statement ok
CREATE SINK s7 from t7 WITH (
type = 'upsert',
connector = 'elasticsearch',
index = 'test',
url = 'http://elasticsearch:9200',
Expand All @@ -41,6 +43,7 @@ CREATE SINK s7 from t7 WITH (

statement ok
CREATE SINK s8 from t7 WITH (
type = 'upsert',
connector = 'elasticsearch',
index = 'test1',
primary_key = 'v1,v3',
Expand Down
115 changes: 115 additions & 0 deletions e2e_test/udf/create_and_drop.slt
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# 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 error function with name add\(integer,integer\) exists
create function add(int, int) returns int language sql as $$select $1 + $2$$;

statement ok
create function if not exists add(int, int) returns int language sql as $$select $1 + $2$$;

statement ok
create function add_v2(int, int) returns int language sql as $$select $1 + $2$$;

statement ok
create aggregate mysum(value int) returns int language python as $$
def create_state():
return 0
def accumulate(state, value):
return state + value
def finish(state):
return state
$$;

statement error function with name mysum\(integer\) exists
create aggregate mysum(value int) returns int language python as $$
def create_state():
return 0
def accumulate(state, value):
return state + value
def finish(state):
return state
$$;

statement ok
create aggregate if not exists mysum(value int) returns int language python as $$
def create_state():
return 0
def accumulate(state, value):
return state + value
def finish(state):
return state
$$;

statement ok
create materialized view mv as select add(a, b) + add_v2(a, b) as c from t;

statement ok
create materialized view mv2 as select mysum(a) as s from t;

statement error function used by 1 other objects
drop function add;

statement error function used by 1 other objects
drop function if exists add;

statement error function used by 1 other objects
drop function add_v2;

statement error function used by 1 other objects
drop aggregate mysum;

statement ok
drop materialized view mv;

statement ok
drop materialized view mv2;

statement ok
drop function add;

statement error function not found
drop function add;

statement ok
drop function if exists add;

statement ok
drop function add_v2;

statement ok
drop function if exists add_v2;

statement ok
drop aggregate mysum;

statement ok
drop aggregate if exists mysum;

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 function used by 1 other objects
drop function add;

statement ok
drop sink s;

statement ok
drop function add;

statement ok
drop table t;
52 changes: 0 additions & 52 deletions e2e_test/udf/drop_function.slt

This file was deleted.

Loading

0 comments on commit e010cb5

Please sign in to comment.