-
Notifications
You must be signed in to change notification settings - Fork 598
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Richard Chien <[email protected]>
- Loading branch information
Showing
15 changed files
with
698 additions
and
543 deletions.
There are no files selected for viewing
58 changes: 58 additions & 0 deletions
58
src/frontend/planner_test/tests/testdata/input/watermark_group.yaml
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,58 @@ | ||
- name: explicit watermark definition + implicit proctime watermark | ||
sql: | | ||
create table t ( | ||
foo int, | ||
event_time timestamp, | ||
proc_time timestamp as proctime(), | ||
watermark for event_time as event_time - interval '5 minutes' | ||
) append only; | ||
select * from t; | ||
expected_outputs: | ||
- stream_plan | ||
- eowc_stream_plan | ||
- name: tumble window_start + window_end | ||
sql: | | ||
create table t ( | ||
foo int, | ||
ts timestamp, | ||
watermark for ts as ts - interval '5 minutes' | ||
) append only; | ||
select | ||
foo, window_start, window_end | ||
from tumble(t, ts, interval '1 hour'); | ||
expected_outputs: | ||
- stream_plan | ||
- eowc_stream_plan | ||
- name: hop window_start + window_end | ||
sql: | | ||
create table t ( | ||
foo int, | ||
ts timestamp, | ||
watermark for ts as ts - interval '5 minutes' | ||
) append only; | ||
select | ||
foo, window_start, window_end | ||
from hop(t, ts, interval '20 mins', interval '1 hour'); | ||
expected_outputs: | ||
- stream_plan | ||
- eowc_stream_plan | ||
- name: join window_start = window_start | ||
sql: | | ||
create table t ( | ||
foo int, | ||
ts timestamp, | ||
watermark for ts as ts - interval '5 minutes' | ||
) append only; | ||
select | ||
foo1 + foo2 as foo, | ||
win1, win2 | ||
from ( | ||
select foo as foo1, window_start as win1 from tumble(t, ts, interval '5 mins') | ||
) as left | ||
join ( | ||
select foo + 1 as foo2, window_start as win2 from tumble(t, ts, interval '10 mins') | ||
) as right | ||
on win1 = win2; | ||
expected_outputs: | ||
- stream_plan | ||
- eowc_stream_plan |
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
Oops, something went wrong.