-
Notifications
You must be signed in to change notification settings - Fork 570
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into chore/alter-show-cluster-cmd
- Loading branch information
Showing
119 changed files
with
2,693 additions
and
831 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 |
---|---|---|
|
@@ -15,8 +15,3 @@ jobs: | |
version-prefix: 'release-' | ||
version-separator: '.' | ||
overwrite: false | ||
- name: Add issue to project | ||
uses: actions/[email protected] | ||
with: | ||
project-url: https:/orgs/risingwavelabs/projects/13 | ||
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
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
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,5 @@ | ||
statement ok | ||
SET RW_IMPLICIT_FLUSH TO true; | ||
|
||
include ./special_cases/mod.slt.part | ||
include ./over_window/mod.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 @@ | ||
../../over_window/generated/batch |
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 @@ | ||
include ./to_agg_then_join.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Disabled, see https:/risingwavelabs/risingwave/issues/10887 | ||
|
||
statement ok | ||
create table t (ts timestamp); | ||
|
||
statement ok | ||
create view v as select * from t where ts at time zone 'utc' >= now(); | ||
|
||
statement ok | ||
create materialized view mv as select * from v; | ||
|
||
statement ok | ||
insert into t select * from generate_series( | ||
now() at time zone 'utc' - interval '10' second, | ||
now() at time zone 'utc' + interval '20' second, | ||
interval '1' second / 20 | ||
); | ||
|
||
statement ok | ||
flush; | ||
|
||
statement ok | ||
start transaction read only; | ||
|
||
# the view should not be empty, so that the following check is meaningful | ||
query T | ||
select count(*) > 0 from mv; | ||
---- | ||
t | ||
|
||
# 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; | ||
---- | ||
|
||
statement ok | ||
commit; | ||
|
||
statement ok | ||
drop materialized view mv; | ||
|
||
statement ok | ||
drop view v; | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Please run `gen.py` after modifying SLT template files in `templates`. |
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,43 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import os | ||
import shutil | ||
from os import path | ||
from string import Template | ||
|
||
cd = path.dirname(path.abspath(__file__)) | ||
templates_dir = path.join(cd, "templates") | ||
generated_dir = path.join(cd, "generated") | ||
|
||
contexts = { | ||
"batch": { | ||
"view_type": "view", | ||
}, | ||
"streaming": { | ||
"view_type": "materialized view", | ||
}, | ||
} | ||
|
||
file_head = """# This file is generated by `gen.py`. Do not edit it manually!""" | ||
|
||
for mode in contexts.keys(): | ||
mode_dir = path.join(generated_dir, mode) | ||
shutil.rmtree(mode_dir) | ||
os.makedirs(mode_dir, exist_ok=True) | ||
|
||
for file in os.listdir(templates_dir): | ||
if not file.endswith(".slt") and not file.endswith(".slt.part"): | ||
continue | ||
|
||
print(f"Generating `{file}`...") | ||
|
||
with open(path.join(templates_dir, file), "r") as f: | ||
tpl = Template(f.read()) | ||
|
||
for mode, context in contexts.items(): | ||
out_file = path.join(generated_dir, mode, file) | ||
with open(out_file, "w") as f: | ||
f.write(file_head + "\n\n") | ||
f.write(tpl.safe_substitute(context)) | ||
|
||
print("Done.") |
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,42 @@ | ||
# This file is generated by `gen.py`. Do not edit it manually! | ||
|
||
# result should be empty, which means output in v_a_b all equal to v_a and v_b | ||
query i | ||
select | ||
id, out1, out3, out4 | ||
from v_a_b | ||
except | ||
select | ||
id, out1, out3, out4 | ||
from v_a natural join v_b; | ||
---- | ||
|
||
query i | ||
select | ||
id, out1, out7, out8, out9 | ||
from v_a_c | ||
except | ||
select | ||
id, out1, out7, out8, out9 | ||
from v_a natural join v_c; | ||
---- | ||
|
||
query i | ||
select | ||
id, out3, out4, out7, out8, out9 | ||
from v_b_c | ||
except | ||
select | ||
id, out3, out4, out7, out8, out9 | ||
from v_b natural join v_c; | ||
---- | ||
|
||
query i | ||
select | ||
id, out1, out2, out3, out4, out5, out6, out7, out8, out9 | ||
from v_a_b_c | ||
except | ||
select | ||
id, out1, out2, out3, out4, out5, out6, out7, out8, out9 | ||
from v_a natural join v_b natural join v_c; | ||
---- |
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,28 @@ | ||
# This file is generated by `gen.py`. Do not edit it manually! | ||
|
||
statement ok | ||
drop view v_a; | ||
|
||
statement ok | ||
drop view v_b; | ||
|
||
statement ok | ||
drop view v_c; | ||
|
||
statement ok | ||
drop view v_d; | ||
|
||
statement ok | ||
drop view v_a_b; | ||
|
||
statement ok | ||
drop view v_b_c; | ||
|
||
statement ok | ||
drop view v_a_c; | ||
|
||
statement ok | ||
drop view v_a_b_c; | ||
|
||
statement ok | ||
drop table t; |
Oops, something went wrong.