-
Notifications
You must be signed in to change notification settings - Fork 590
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sink): prune out hidden columns on sink (#8099)
- Prune out hidden columns on sink - Reject upsert sink without pk after pruning - Refine `StreamSink` explain format Approved-By: tabVersion Approved-By: st1page
- Loading branch information
Showing
11 changed files
with
122 additions
and
14 deletions.
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
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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
statement ok | ||
create table t(v int); | ||
create table t (v int) with ( appendonly = 'true' ); | ||
|
||
statement ok | ||
explain create index i on t(v); | ||
|
||
statement ok | ||
explain create sink sink_t from t with ( connector = 'kafka' ) | ||
explain create sink sink_t from t with ( connector = 'kafka', format = 'append_only' ) | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
statement ok | ||
create table t1 (v1 int, v2 int); | ||
|
||
statement error No primary key for the upsert sink | ||
create sink s1 from t1 with (connector = 'console'); | ||
|
||
statement ok | ||
create sink s1 as select v1, v2, _row_id from t1 with (connector = 'console'); | ||
|
||
statement ok | ||
create table t2 (v1 int, v2 int primary key); | ||
|
||
statement ok | ||
create sink s2 from t2 with (connector = 'console'); | ||
|
||
statement error No primary key for the upsert sink | ||
create sink s3 as select avg(v1) from t2 with (connector = 'console'); | ||
|
||
statement ok | ||
create sink s3 as select avg(v1) from t2 with (connector = 'console', format = 'append_only', force_append_only = 'true'); | ||
|
||
statement ok | ||
create sink s4 as select avg(v1), v2 from t2 group by v2 with (connector = 'console'); | ||
|
||
statement error The sink cannot be append-only | ||
create sink s5 from t2 with (connector = 'console', format = 'append_only'); | ||
|
||
statement ok | ||
create sink s5 from t2 with (connector = 'console', format = 'append_only', force_append_only = 'true'); | ||
|
||
statement error Cannot force the sink to be append-only | ||
create sink s6 from t2 with (connector = 'console', format = 'upsert', force_append_only = 'true'); | ||
|
||
statement ok | ||
drop sink s1 | ||
|
||
statement ok | ||
drop sink s2 | ||
|
||
statement ok | ||
drop sink s3 | ||
|
||
statement ok | ||
drop sink s4 | ||
|
||
statement ok | ||
drop sink s5 | ||
|
||
statement ok | ||
drop table t1 | ||
|
||
statement ok | ||
drop table t2 |
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
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