-
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.
- Loading branch information
Showing
7 changed files
with
124 additions
and
7 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
e2e_test/backfill/snapshot_backfill/check_data_equal.slt.part
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,12 @@ | ||
# the result from batch query and materialized view should be the same | ||
query T | ||
select * from v | ||
except | ||
select * from mv; | ||
---- | ||
|
||
query T | ||
select * from mv | ||
except | ||
select * from v; | ||
---- |
51 changes: 51 additions & 0 deletions
51
e2e_test/backfill/snapshot_backfill/create_nexmark_table.slt.part
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,51 @@ | ||
statement ok | ||
CREATE table person ( | ||
"id" BIGINT, | ||
"name" VARCHAR, | ||
"email_address" VARCHAR, | ||
"credit_card" VARCHAR, | ||
"city" VARCHAR, | ||
"state" VARCHAR, | ||
"date_time" TIMESTAMP, | ||
"extra" VARCHAR | ||
) with ( | ||
connector = 'nexmark', | ||
nexmark.table.type = 'Person', | ||
nexmark.split.num = '8', | ||
nexmark.min.event.gap.in.ns = '10000' | ||
); | ||
|
||
statement ok | ||
CREATE table auction ( | ||
"id" BIGINT, | ||
"item_name" VARCHAR, | ||
"description" VARCHAR, | ||
"initial_bid" BIGINT, | ||
"reserve" BIGINT, | ||
"date_time" TIMESTAMP, | ||
"expires" TIMESTAMP, | ||
"seller" BIGINT, | ||
"category" BIGINT, | ||
"extra" VARCHAR | ||
) with ( | ||
connector = 'nexmark', | ||
nexmark.table.type = 'Auction', | ||
nexmark.split.num = '8', | ||
nexmark.min.event.gap.in.ns = '10000' | ||
); | ||
|
||
statement ok | ||
CREATE table bid ( | ||
"auction" BIGINT, | ||
"bidder" BIGINT, | ||
"price" BIGINT, | ||
"channel" VARCHAR, | ||
"url" VARCHAR, | ||
"date_time" TIMESTAMP, | ||
"extra" VARCHAR | ||
) with ( | ||
connector = 'nexmark', | ||
nexmark.table.type = 'Bid', | ||
nexmark.split.num = '8', | ||
nexmark.min.event.gap.in.ns = '10000' | ||
); |
8 changes: 8 additions & 0 deletions
8
e2e_test/backfill/snapshot_backfill/drop_nexmark_table.slt.part
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,8 @@ | ||
statement ok | ||
drop table bid; | ||
|
||
statement ok | ||
drop table auction; | ||
|
||
statement ok | ||
drop table person; |
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,38 @@ | ||
include ./create_nexmark_table.slt.part | ||
|
||
sleep 10s | ||
|
||
statement ok | ||
set backfill_rate_limit = 200; | ||
|
||
statement ok | ||
set streaming_use_snapshot_backfill = true; | ||
|
||
statement ok | ||
create view v as | ||
SELECT P.name, | ||
P.city, | ||
P.state, | ||
A.id | ||
FROM auction AS A | ||
INNER JOIN person AS P on A.seller = P.id | ||
WHERE A.category = 10 | ||
and (P.state = 'or' OR P.state = 'id' OR P.state = 'ca'); | ||
|
||
statement ok | ||
create materialized view mv as select * from v; | ||
|
||
include ./check_data_equal.slt.part | ||
|
||
sleep 3s | ||
|
||
include ./check_data_equal.slt.part | ||
|
||
|
||
statement ok | ||
drop materialized view mv; | ||
|
||
statement ok | ||
drop view v; | ||
|
||
include ./drop_nexmark_table.slt.part |
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