Skip to content

Commit

Permalink
Merge branch 'main' into bz/log-thread-name
Browse files Browse the repository at this point in the history
  • Loading branch information
BugenZhao authored Dec 26, 2023
2 parents 305b23b + 01bbc08 commit 5bd1564
Show file tree
Hide file tree
Showing 95 changed files with 3,545 additions and 441 deletions.
4 changes: 2 additions & 2 deletions .vscode/tasks.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"command": "/bin/bash",
"args": [
"-c",
"risedev k ; cargo build --bin risingwave"
"${workspaceFolder}/risedev k ; cargo build --bin risingwave"
]
}
]
}
}
17 changes: 10 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions ci/scripts/gen-integration-test-yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
'vector': ['json'],
'nats': ['json'],
'doris-sink': ['json'],
'starrocks-sink': ['json'],
}

def gen_pipeline_steps():
Expand Down
1 change: 1 addition & 0 deletions ci/scripts/notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"big-query-sink-json": ["xinhao"],
"vector-json": ["tao"],
"doris-sink": ["xinhao"],
"starrocks-sink": ["xinhao"],
}

def get_failed_tests(get_test_status, test_map):
Expand Down
1 change: 1 addition & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ coverage:
- "src/"
target: auto # compared with the coverage from the base commit
threshold: 0.1% # allow the coverage to drop by 0.1% and posting a success status
codecov:
allow_coverage_offsets: true
ignore:
- "src/risedevtooltool"
Expand Down
2 changes: 1 addition & 1 deletion docker/dashboards/risingwave-dev-dashboard.json

Large diffs are not rendered by default.

55 changes: 55 additions & 0 deletions e2e_test/batch/catalog/sysinfo.slt.part
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,58 @@ query T
select (SELECT pg_catalog.pg_get_userbyid(1));
----
root

statement ok
create table tab(num int, name varchar);

statement ok
create index tab_idx on tab(num desc);

query T
select pg_get_indexdef('tab_idx'::regclass);
----
CREATE INDEX tab_idx ON tab(num DESC)

query error Invalid parameter oid: index not found:
select pg_get_indexdef('tab'::regclass);

query error Invalid parameter name: class not found: tab_null
select pg_get_indexdef('tab_null'::regclass);

statement ok
drop index tab_idx;

statement ok
drop table tab;

statement ok
create table tab(a int, b int, c int, d int);

statement ok
CREATE INDEX tab_idx ON tab (a, (b + c + (1 + 1))) include (d);

query T
select pg_get_indexdef('tab_idx'::regclass), pg_get_indexdef('tab_idx'::regclass, 0, true);
----
CREATE INDEX tab_idx ON tab(a, (b + c + (1 + 1))) INCLUDE(d) CREATE INDEX tab_idx ON tab(a, (b + c + (1 + 1))) INCLUDE(d)

query T
select pg_get_indexdef('tab_idx'::regclass, 1, true), pg_get_indexdef('tab_idx'::regclass, 2, true);
----
a ((b + c) + (1:Int32 + 1:Int32))

query T
select pg_get_indexdef('tab_idx'::regclass, 3, true);
----
d

query T
select pg_get_indexdef('tab_idx'::regclass, -1, true), pg_get_indexdef('tab_idx'::regclass, 4, true);
----
(empty) (empty)

statement ok
drop index tab_idx;

statement ok
drop table tab;
31 changes: 31 additions & 0 deletions e2e_test/over_window/generated/batch/odd_frames/mod.slt.part
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This file is generated by `gen.py`. Do not edit it manually!

# Test weird window frames.

statement ok
create table t (a int, b int, c int);

statement ok
create view v as
select
count(*) over (partition by 1::int order by b rows between 1 preceding and 10 preceding),
count(*) over (partition by 1::int order by b rows between 10 following and 1 following)
from t;

statement ok
insert into t values
(1, 1, 1)
,(1, 2, 3)
,(1, 4, 9)
;

query II
select * from v;
----
0 0

statement ok
drop view v;

statement ok
drop table t;
31 changes: 31 additions & 0 deletions e2e_test/over_window/generated/streaming/odd_frames/mod.slt.part
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This file is generated by `gen.py`. Do not edit it manually!

# Test weird window frames.

statement ok
create table t (a int, b int, c int);

statement ok
create materialized view v as
select
count(*) over (partition by 1::int order by b rows between 1 preceding and 10 preceding),
count(*) over (partition by 1::int order by b rows between 10 following and 1 following)
from t;

statement ok
insert into t values
(1, 1, 1)
,(1, 2, 3)
,(1, 4, 9)
;

query II
select * from v;
----
0 0

statement ok
drop materialized view v;

statement ok
drop table t;
29 changes: 29 additions & 0 deletions e2e_test/over_window/templates/odd_frames/mod.slt.part
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Test weird window frames.

statement ok
create table t (a int, b int, c int);

statement ok
create $view_type v as
select
count(*) over (partition by 1::int order by b rows between 1 preceding and 10 preceding),
count(*) over (partition by 1::int order by b rows between 10 following and 1 following)
from t;

statement ok
insert into t values
(1, 1, 1)
,(1, 2, 3)
,(1, 4, 9)
;

query II
select * from v;
----
0 0

statement ok
drop $view_type v;

statement ok
drop table t;
4 changes: 2 additions & 2 deletions e2e_test/sink/sink_into_table.slt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ statement error Only append-only sinks can sink to a table without primary keys.
create sink s1 into t_row_id_as_primary_key as select v1, v2 from t_s1;

statement ok
create sink s1 into t_row_id_as_primary_key as select v1, v2 from t_s1 with (type = 'append-only', force_append_only = 'true');
create sink s1 into t_row_id_as_primary_key as select v1, v2 from t_s1 FORMAT PLAIN ENCODE NATIVE(force_append_only='true');

statement ok
flush;
Expand Down Expand Up @@ -154,7 +154,7 @@ statement error Only append-only sinks can sink to a table without primary keys.
create sink s2 into t_append_only as select v1, v2 from t_s2;

statement ok
create sink s2 into t_append_only as select v1, v2 from t_s2 with (type = 'append-only', force_append_only = 'true');
create sink s2 into t_append_only as select v1, v2 from t_s2 FORMAT PLAIN ENCODE NATIVE(force_append_only='true');

statement ok
flush;
Expand Down
Loading

0 comments on commit 5bd1564

Please sign in to comment.