-
Notifications
You must be signed in to change notification settings - Fork 590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(steam): support stream change log #17132
Merged
Merged
Changes from 10 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
de9b71c
save
xxhZs c17f5b5
save
xxhZs 03d1383
save
xxhZs 759b4c9
add test
xxhZs 5195a4e
rename
xxhZs 10a7707
fix ci
xxhZs 76e205c
Merge branch 'main' into xxh/stream-subscription
xxhZs f4df317
fix comm
xxhZs 2a1d9bf
fix comm
xxhZs 5dd77bf
fmt
xxhZs 027adea
fix comm
xxhZs ab6422a
fmt
xxhZs 267e6c9
fix com
xxhZs 0b21756
Merge branch 'main' into xxh/stream-subscription
xxhZs 056daf7
rename
xxhZs 7c8d8dc
watermark
xxhZs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,164 @@ | ||
statement ok | ||
SET RW_IMPLICIT_FLUSH TO true; | ||
|
||
statement ok | ||
create table t1 (v1 int, v2 int); | ||
|
||
statement ok | ||
create table t2 (v1 int, v2 int); | ||
|
||
statement ok | ||
create table t3 (v1 int primary key, v2 int); | ||
|
||
statement ok | ||
create materialized view mv1 as with sub as changelog from t1 select * from sub; | ||
|
||
statement ok | ||
create materialized view mv2 as with sub as changelog from t2 select * from sub; | ||
|
||
statement ok | ||
create materialized view mv3 as with sub as changelog from t1 select v1, v2 from sub; | ||
|
||
statement ok | ||
create materialized view mv4 as with sub1 as changelog from t1, sub2 as changelog from t2 | ||
select sub1.v1 as v11, sub1.v2 as v12, sub2.v1 as v21, sub2.v2 as v22 from sub1 inner join sub2 on sub1.v1 = sub2.v1; | ||
|
||
statement ok | ||
create materialized view mv5 as with sub1 as changelog from t1, sub2 as changelog from t2 | ||
select sub1.v1 as v11, sub1.v2 as v12, sub2.v1 as v21, sub2.v2 as v22, sub1.op as op1, sub2.op as op2 from sub1 inner join sub2 on sub1.v1 = sub2.v1; | ||
|
||
statement ok | ||
create materialized view mv6 as with sub as changelog from t3 select * from sub; | ||
|
||
statement ok | ||
create materialized view mv7(col1,col2,col3) as with sub as changelog from t3 select * from sub; | ||
|
||
statement ok | ||
insert into t1 values(1,1),(2,2); | ||
|
||
statement ok | ||
insert into t2 values(1,10),(2,20); | ||
|
||
statement ok | ||
insert into t3 values(5,5),(6,6); | ||
|
||
statement ok | ||
update t1 set v2 = 100 where v1 = 1; | ||
|
||
statement ok | ||
update t2 set v2 = 100 where v1 = 1; | ||
|
||
statement ok | ||
update t3 set v2 = 500 where v1 = 5; | ||
|
||
statement ok | ||
delete from t1 where v1 = 2; | ||
|
||
statement ok | ||
alter materialized view mv7 rename to mv7_rename; | ||
|
||
statement ok | ||
alter table t3 rename to t3_rename; | ||
|
||
query III rowsort | ||
select * from mv1 order by v1; | ||
---- | ||
1 1 1 | ||
1 1 4 | ||
1 100 3 | ||
2 2 1 | ||
2 2 2 | ||
|
||
query III rowsort | ||
select * from mv2 order by v1; | ||
---- | ||
1 10 1 | ||
1 10 4 | ||
1 100 3 | ||
2 20 1 | ||
|
||
query III rowsort | ||
select * from mv3 order by v1; | ||
---- | ||
1 1 | ||
1 1 | ||
1 100 | ||
2 2 | ||
2 2 | ||
|
||
query III rowsort | ||
select * from mv4 order by v11,v21; | ||
---- | ||
1 1 1 10 | ||
1 1 1 10 | ||
1 1 1 10 | ||
1 1 1 10 | ||
1 1 1 100 | ||
1 1 1 100 | ||
1 100 1 10 | ||
1 100 1 10 | ||
1 100 1 100 | ||
2 2 2 20 | ||
2 2 2 20 | ||
|
||
|
||
query III rowsort | ||
select * from mv5 order by v11,v21; | ||
---- | ||
1 1 1 10 1 1 | ||
1 1 1 10 1 4 | ||
1 1 1 10 4 1 | ||
1 1 1 10 4 4 | ||
1 1 1 100 1 3 | ||
1 1 1 100 4 3 | ||
1 100 1 10 3 1 | ||
1 100 1 10 3 4 | ||
1 100 1 100 3 3 | ||
2 2 2 20 1 1 | ||
2 2 2 20 2 1 | ||
|
||
query III rowsort | ||
select * from mv6 order by v1; | ||
---- | ||
5 5 1 | ||
5 5 4 | ||
5 500 3 | ||
6 6 1 | ||
|
||
query III rowsort | ||
select * from mv7_rename order by col1; | ||
---- | ||
5 5 1 | ||
5 5 4 | ||
5 500 3 | ||
6 6 1 | ||
|
||
statement ok | ||
drop materialized view mv7_rename; | ||
|
||
statement ok | ||
drop materialized view mv6; | ||
|
||
statement ok | ||
drop materialized view mv5; | ||
|
||
statement ok | ||
drop materialized view mv4; | ||
|
||
statement ok | ||
drop materialized view mv3; | ||
|
||
statement ok | ||
drop materialized view mv2; | ||
|
||
statement ok | ||
drop materialized view mv1; | ||
|
||
statement ok | ||
drop table t3_rename; | ||
|
||
statement ok | ||
drop table t2; | ||
|
||
statement ok | ||
drop table t1; |
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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is used for projection push-down to prune out op column if it is not used in downstream. Can we have some documentation to explain in which case
need_op
is false?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also add documentation here in the pb in addition to the rust codes as well?