Skip to content

Commit

Permalink
Merge branch 'main' into wkx-check-may-exist-in-join
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] committed Feb 21, 2023
2 parents c8e7795 + c4516de commit 3cb3842
Show file tree
Hide file tree
Showing 51 changed files with 502 additions and 431 deletions.
4 changes: 4 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ labels:
title: "^test.*"
- label: "component/doc"
title: "^doc.*"

- label: "user-facing-changes"
negate: true
body: 'My PR \*\*DOES NOT\*\* contain user-facing changes'
7 changes: 6 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,19 @@ Please explain **IN DETAIL** what the changes are in this PR and why they are ne
-->

## Checklist
## Checklist For Contributors

- [ ] I have written necessary rustdoc comments
- [ ] I have added necessary unit tests and integration tests
- [ ] I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features).
- [ ] I have demonstrated that backward compatibility is not broken by breaking changes and created issues to track deprecated features to be removed in the future. (Please refer to the issue)
- [ ] All checks passed in `./risedev check` (or alias, `./risedev c`)

## Checklist For Reviewers

- [ ] I have requested macro/micro-benchmarks as this PR can affect performance substantially, and the results are shown.
<!-- To manually trigger a benchmark, please check out [Notion](https://www.notion.so/risingwave-labs/Manually-trigger-nexmark-performance-dashboard-test-b784f1eae1cf48889b2645d020b6b7d3). -->

## Documentation

- [ ] My PR **DOES NOT** contain user-facing changes.
Expand Down
2 changes: 2 additions & 0 deletions Cargo.lock

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

16 changes: 8 additions & 8 deletions dashboard/proto/gen/stream_plan.ts

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

50 changes: 1 addition & 49 deletions dashboard/proto/gen/stream_service.ts

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

11 changes: 9 additions & 2 deletions e2e_test/batch/catalog/pg_cast.slt.part
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
query IIIT
SELECT * FROM pg_catalog.pg_cast
SELECT * FROM pg_catalog.pg_cast;
----
0 16 23 EXPLICIT
1 16 1043 ASSIGN
Expand Down Expand Up @@ -68,7 +68,14 @@ SELECT * FROM pg_catalog.pg_cast
64 1184 1114 ASSIGN
65 1186 1043 ASSIGN
66 1186 1083 ASSIGN
67 3802 1043 ASSIGN
67 3802 16 EXPLICIT
68 3802 21 EXPLICIT
69 3802 23 EXPLICIT
70 3802 20 EXPLICIT
71 3802 700 EXPLICIT
72 3802 701 EXPLICIT
73 3802 1700 EXPLICIT
74 3802 1043 ASSIGN

query TT rowsort
SELECT s.typname, t.typname
Expand Down
37 changes: 37 additions & 0 deletions e2e_test/batch/functions/array_join.slt.part
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
query T
select array_join(array[1, 2, 3, NULL, 5], ',')
----
1,2,3,5

query T
select array_join(array[1, 2, 3, NULL, 5], ',', '*')
----
1,2,3,*,5

query T
select array_join(array[null,'foo',null], ',', '*');
----
*,foo,*

query T
select array_join(array['2023-02-20 17:35:25'::timestamp, null,'2023-02-19 13:01:30'::timestamp], ',', '*');
----
2023-02-20 17:35:25,*,2023-02-19 13:01:30

query T
with t as (
select array[1,null,2,3] as arr, ',' as d union all
select array[4,5,6,null,7] as arr, '|')
select array_join(arr, d) from t;
----
1,2,3
4|5|6|7

# `array` or `delimiter` are required. Otherwise, returns null.
query T
select array_join(array[1,2], NULL);
----
NULL

query error polymorphic type
select array_join(null, ',');
50 changes: 50 additions & 0 deletions e2e_test/batch/types/jsonb.slt.part
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,55 @@ null
true
NULL

query T
select 'true'::jsonb::bool;
----
t

query I
select '1'::jsonb::smallint;
----
1

query I
select '1'::jsonb::int;
----
1

query I
select '1'::jsonb::bigint;
----
1

query R
select '2.5'::jsonb::decimal;
----
2.5

query R
select '2.5'::jsonb::real;
----
2.5

query R
select '2.5'::jsonb::double precision;
----
2.5

# This would fail after #5576 fixed
# Because PG rounds differently for `decimal -> int` and `float8 -> int`
query II
select '2.5'::jsonb::smallint, '3.5'::jsonb::smallint;
----
2 3

statement error cannot cast jsonb null to type boolean
select 'null'::jsonb::bool;

query T
select null::jsonb::bool;
----
NULL

statement ok
drop table t;
9 changes: 9 additions & 0 deletions e2e_test/source/basic/ddl.slt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ create source s with (
properties.bootstrap.server = '127.0.0.1:29092'
) row format json;

statement ok
create materialized view mv_1 as select * from s

statement error other relation\(s\) depend on it
drop source s

statement ok
drop materialized view mv_1

statement ok
drop source s

Expand Down
2 changes: 1 addition & 1 deletion proto/stream_plan.proto
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ message StreamFragmentGraph {
// edges between fragments.
repeated StreamFragmentEdge edges = 2;

repeated uint32 dependent_table_ids = 3;
repeated uint32 dependent_relation_ids = 3;
uint32 table_ids_cnt = 4;
StreamEnvironment env = 5;
// If none, default parallelism will be applied.
Expand Down
6 changes: 0 additions & 6 deletions proto/stream_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,10 @@ import "stream_plan.proto";
option java_package = "com.risingwave.proto";
option optimize_for = SPEED;

message HangingChannel {
common.ActorInfo upstream = 1;
common.ActorInfo downstream = 2;
}

// Describe the fragments which will be running on this node
message UpdateActorsRequest {
string request_id = 1;
repeated stream_plan.StreamActor actors = 2;
repeated HangingChannel hanging_channels = 3;
}

message UpdateActorsResponse {
Expand Down
4 changes: 1 addition & 3 deletions scripts/source/test_data/kafka_1_partition_mv_topic.1
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,4 @@
{"v1":7,"v2":"name0"}
{"v1":0,"v2":"name9"}
{"v1":3,"v2":"name2"}
{"v1":7,"v2":"name5"}
{"v1":1,"v2":"name7"}
{"v1":3,"v2":"name9"}
[{"v1":7,"v2":"name5"},{"v1":1,"v2":"name7"},{"v1":3,"v2":"name9"}]
3 changes: 1 addition & 2 deletions scripts/source/test_data/kafka_1_partition_topic.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{"v1": 1, "v2": "1"}
{"v1": 2, "v2": "22"}
{"v1": 3, "v2": "333"}
{"v1": 4, "v2": "4444"}
[{"v1": 3, "v2": "333"},{"v1": 4, "v2": "4444"}]
3 changes: 1 addition & 2 deletions scripts/source/test_data/kafka_3_partition_topic.3
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{"v1": 1, "v2": "1"}
{"v1": 2, "v2": "22"}
{"v1": 3, "v2": "333"}
{"v1": 4, "v2": "4444"}
[{"v1": 3, "v2": "333"},{"v1": 4, "v2": "4444"}]
3 changes: 1 addition & 2 deletions scripts/source/test_data/kafka_4_partition_topic.4
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{"v1": 1, "v2": "1"}
{"v1": 2, "v2": "22"}
{"v1": 3, "v2": "333"}
{"v1": 4, "v2": "4444"}
[{"v1": 3, "v2": "333"},{"v1": 4, "v2": "4444"}]
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,4 @@
{"v1": 93, "v2": "QE53BJ", "v3": [93, 93, 93], "v4": {"v5": 93, "v6": 94}}
{"v1": 94, "v2": "9Q7W89", "v3": [94, 94, 94], "v4": {"v5": 94, "v6": 95}}
{"v1": 95, "v2": "VGDBS1", "v3": [95, 95, 95], "v4": {"v5": 95, "v6": 96}}
{"v1": 96, "v2": "KK6WEX", "v3": [96, 96, 96], "v4": {"v5": 96, "v6": 97}}
{"v1": 97, "v2": "XRTK3Y", "v3": [97, 97, 97], "v4": {"v5": 97, "v6": 98}}
{"v1": 98, "v2": "ZQ2TCL", "v3": [98, 98, 98], "v4": {"v5": 98, "v6": 99}}
{"v1": 99, "v2": "15UCX7", "v3": [99, 99, 99], "v4": {"v5": 99, "v6": 100}}
[{"v1": 96, "v2": "KK6WEX", "v3": [96, 96, 96], "v4": {"v5": 96, "v6": 97}},{"v1": 97, "v2": "XRTK3Y", "v3": [97, 97, 97], "v4": {"v5": 97, "v6": 98}},{"v1": 98, "v2": "ZQ2TCL", "v3": [98, 98, 98], "v4": {"v5": 98, "v6": 99}},{"v1": 99, "v2": "15UCX7", "v3": [99, 99, 99], "v4": {"v5": 99, "v6": 100}}]

0 comments on commit 3cb3842

Please sign in to comment.