-
Notifications
You must be signed in to change notification settings - Fork 602
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
1 changed file
with
47 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
statement ok | ||
DROP TABLE IF EXISTS fact; | ||
|
||
statement ok | ||
DROP TABLE IF EXISTS dim; | ||
|
||
statement ok | ||
set streaming_unaligned_join = true; | ||
|
||
statement ok | ||
create table fact(v0 int primary key, v1 int, v2 varchar, v3 varchar); | ||
|
||
statement ok | ||
INSERT INTO fact | ||
SELECT | ||
x as v0, | ||
1 as v1, | ||
'abcdefgakjandjkw' as v2, | ||
'jkb1ku1bu' as v3 | ||
FROM generate_series(1, 100) t(x); | ||
|
||
statement ok | ||
INSERT INTO fact | ||
SELECT | ||
x as v0, | ||
2 as v1, | ||
'abcdefgakjandjkw' as v2, | ||
'jkb1ku1bu' as v3 | ||
FROM generate_series(101, 200) t(x); | ||
|
||
statement ok | ||
create table dim(v1 int); | ||
|
||
statement ok | ||
INSERT INTO dim VALUES(1), (2); | ||
|
||
statement ok | ||
create materialized view m1 as | ||
select fact.v1, v2, v3, count(v0) | ||
from fact join dim on fact.v1 = dim.v1 | ||
group by v1, v2, v3; | ||
|
||
# statement ok | ||
# DELETE FROM dim; | ||
|
||
statement ok | ||
flush; |