forked from risingwavelabs/risingwave
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: introduce
include
clause to add additional connector columns (r…
…isingwavelabs#13707) Signed-off-by: tabVersion <[email protected]> Co-authored-by: xxchan <[email protected]>
- Loading branch information
1 parent
66f6bc0
commit feadac7
Showing
48 changed files
with
952 additions
and
428 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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# upsert format must have a pk | ||
statement error | ||
CREATE TABLE upsert_students_default_key ( | ||
"ID" INT, | ||
"firstName" VARCHAR, | ||
"lastName" VARCHAR, | ||
age INT, | ||
height REAL, | ||
weight REAL | ||
) | ||
INCLUDE KEY AS rw_key | ||
WITH ( | ||
connector = 'kafka', | ||
properties.bootstrap.server = 'message_queue:29092', | ||
topic = 'upsert_json') | ||
FORMAT UPSERT ENCODE JSON | ||
|
||
# upsert format pk must be the key column | ||
statement error | ||
CREATE TABLE upsert_students_default_key ( | ||
"ID" INT primary key, | ||
"firstName" VARCHAR, | ||
"lastName" VARCHAR, | ||
age INT, | ||
height REAL, | ||
weight REAL | ||
) | ||
INCLUDE KEY AS rw_key | ||
WITH ( | ||
connector = 'kafka', | ||
properties.bootstrap.server = 'message_queue:29092', | ||
topic = 'upsert_json') | ||
FORMAT UPSERT ENCODE JSON | ||
|
||
statement ok | ||
CREATE TABLE upsert_students_default_key ( | ||
"ID" INT, | ||
"firstName" VARCHAR, | ||
"lastName" VARCHAR, | ||
age INT, | ||
height REAL, | ||
weight REAL, | ||
) | ||
INCLUDE KEY AS rw_key | ||
WITH ( | ||
connector = 'kafka', | ||
properties.bootstrap.server = 'message_queue:29092', | ||
topic = 'upsert_json') | ||
FORMAT PLAIN ENCODE JSON | ||
|
||
statement ok | ||
select * from upsert_students_default_key; | ||
|
||
# Wait enough time to ensure SourceExecutor consumes all Kafka data. | ||
sleep 3s | ||
|
||
query I | ||
select count(rw_key) from upsert_students_default_key | ||
---- | ||
15 | ||
|
||
statement ok | ||
drop table upsert_students_default_key |
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
138 changes: 0 additions & 138 deletions
138
e2e_test/source/basic/old_row_format_syntax/nosim_kafka.slt
This file was deleted.
Oops, something went wrong.
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.