-
Notifications
You must be signed in to change notification settings - Fork 593
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: specify column when sink into table #16587
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
436d78c
feat: specify column when sink into table
st1page a3761c7
typo
st1page 2962631
improve test
st1page c7adafb
allow clipy
st1page f5b9c1b
Merge branch 'main' into sts/specify_column_when_sink_into_table
st1page be37733
Merge branch 'main' into sts/specify_column_when_sink_into_table
st1page cc3c3cc
Update src/frontend/src/handler/create_sink.rs
st1page 723a309
Merge branch 'main' into sts/specify_column_when_sink_into_table
st1page 356a87d
clippy
st1page 109513d
Merge branch 'sts/specify_column_when_sink_into_table' of github.com:…
st1page 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,54 @@ | ||
statement ok | ||
SET RW_IMPLICIT_FLUSH TO true; | ||
|
||
statement ok | ||
create table s (a int, b int, c int) append only; | ||
|
||
statement ok | ||
create table t (a int, b int default 900, c int default 9000); | ||
|
||
statement error | ||
create sink ss into t(aaa) as select a from s with(type = 'append-only'); | ||
|
||
statement error | ||
create sink ss into t(a) as select a, b from s with(type = 'append-only'); | ||
|
||
statement error | ||
create sink ss into t(a, b) as select b from s with(type = 'append-only'); | ||
|
||
statement error | ||
create sink ss into t(a, b, c, a) as select a, b from s with(type = 'append-only'); | ||
|
||
statement ok | ||
create sink s1 into t(a,B,c) as select c, b, a from s with(type = 'append-only'); | ||
|
||
statement ok | ||
create sink s2 into t(a,B) as select 2*c, 2*b from s with(type = 'append-only'); | ||
|
||
statement ok | ||
create sink s3 into t(c) as select 3*a from s with(type = 'append-only'); | ||
|
||
statement ok | ||
insert into s values(10, 100, 1000); | ||
|
||
query III rowsort | ||
select * from t order by a; | ||
---- | ||
1000 100 10 | ||
2000 200 9000 | ||
NULL 900 30 | ||
|
||
statement ok | ||
drop sink s1; | ||
|
||
statement ok | ||
drop sink s2; | ||
|
||
statement ok | ||
drop sink s3; | ||
|
||
statement ok | ||
drop table s; | ||
|
||
statement ok | ||
drop table t; |
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
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
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.
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.
will do some refactor for the function later. I guess some check should be done in other place instead of here, this PR focus on the feature and not contain it.