-
Notifications
You must be signed in to change notification settings - Fork 599
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 yiming/clear-with-version-id
- Loading branch information
Showing
158 changed files
with
2,062 additions
and
189 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
DROP SINK nexmark_q0_temporal_filter; |
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,7 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
CREATE SINK nexmark_q0_temporal_filter | ||
AS | ||
SELECT auction, bidder, price, date_time | ||
FROM bid_filtered | ||
WITH ( connector = 'blackhole', type = 'append-only', force_append_only = 'true'); |
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,3 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
DROP SINK nexmark_q1_temporal_filter; |
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,10 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
CREATE SINK nexmark_q1_temporal_filter | ||
AS | ||
SELECT auction, | ||
bidder, | ||
0.908 * price as price, | ||
date_time | ||
FROM bid_filtered | ||
WITH ( connector = 'blackhole', type = 'append-only', force_append_only = 'true'); |
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,3 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
DROP SINK nexmark_q10_temporal_filter; |
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,11 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
CREATE SINK nexmark_q10_temporal_filter AS | ||
SELECT auction, | ||
bidder, | ||
price, | ||
date_time, | ||
TO_CHAR(date_time, 'YYYY-MM-DD') as date, | ||
TO_CHAR(date_time, 'HH:MI') as time | ||
FROM bid_filtered | ||
WITH ( connector = 'blackhole', type = 'append-only', force_append_only = 'true'); |
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,3 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
DROP SINK nexmark_q101_temporal_filter; |
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,16 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
CREATE SINK nexmark_q101_temporal_filter AS | ||
SELECT | ||
a.id AS auction_id, | ||
a.item_name AS auction_item_name, | ||
b.max_price AS current_highest_bid | ||
FROM auction a | ||
LEFT OUTER JOIN ( | ||
SELECT | ||
b1.auction, | ||
MAX(b1.price) max_price | ||
FROM bid_filtered b1 | ||
GROUP BY b1.auction | ||
) b ON a.id = b.auction | ||
WITH ( connector = 'blackhole', type = 'append-only', force_append_only = 'true'); |
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,3 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
DROP SINK nexmark_q102_temporal_filter; |
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,14 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
CREATE SINK nexmark_q102_temporal_filter AS | ||
SELECT | ||
a.id AS auction_id, | ||
a.item_name AS auction_item_name, | ||
COUNT(b.auction) AS bid_count | ||
FROM auction a | ||
JOIN bid_filtered b ON a.id = b.auction | ||
GROUP BY a.id, a.item_name | ||
HAVING COUNT(b.auction) >= ( | ||
SELECT COUNT(*) / COUNT(DISTINCT auction) FROM bid_filtered | ||
) | ||
WITH ( connector = 'blackhole', type = 'append-only', force_append_only = 'true'); |
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,3 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
DROP SINK nexmark_q103_temporal_filter; |
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,13 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
CREATE SINK nexmark_q103_temporal_filter AS | ||
SELECT | ||
a.id AS auction_id, | ||
a.item_name AS auction_item_name | ||
FROM auction a | ||
WHERE a.id IN ( | ||
SELECT b.auction FROM bid_filtered b | ||
GROUP BY b.auction | ||
HAVING COUNT(*) >= 20 | ||
) | ||
WITH ( connector = 'blackhole', type = 'append-only', force_append_only = 'true'); |
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,3 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
DROP SINK nexmark_q104_temporal_filter; |
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,13 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
CREATE SINK nexmark_q104_temporal_filter AS | ||
SELECT | ||
a.id AS auction_id, | ||
a.item_name AS auction_item_name | ||
FROM auction a | ||
WHERE a.id NOT IN ( | ||
SELECT b.auction FROM bid_filtered b | ||
GROUP BY b.auction | ||
HAVING COUNT(*) < 20 | ||
) | ||
WITH ( connector = 'blackhole', type = 'append-only', force_append_only = 'true'); |
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,3 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
DROP SINK nexmark_q105_temporal_filter; |
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,13 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
CREATE SINK nexmark_q105_temporal_filter AS | ||
SELECT | ||
a.id AS auction_id, | ||
a.item_name AS auction_item_name, | ||
COUNT(b.auction) AS bid_count | ||
FROM auction a | ||
JOIN bid_filtered b ON a.id = b.auction | ||
GROUP BY a.id, a.item_name | ||
ORDER BY bid_count DESC | ||
LIMIT 1000 | ||
WITH ( connector = 'blackhole', type = 'append-only', force_append_only = 'true'); |
3 changes: 3 additions & 0 deletions
3
ci/scripts/sql/nexmark/q105-without-limit-temporal-filter.drop.sql
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,3 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
DROP SINK nexmark_q105_without_limit_temporal_filter; |
11 changes: 11 additions & 0 deletions
11
ci/scripts/sql/nexmark/q105-without-limit-temporal-filter.sql
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,11 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
CREATE SINK nexmark_q105_without_limit_temporal_filter AS | ||
SELECT | ||
a.id AS auction_id, | ||
a.item_name AS auction_item_name, | ||
COUNT(b.auction) AS bid_count | ||
FROM auction a | ||
JOIN bid_filtered b ON a.id = b.auction | ||
GROUP BY a.id, a.item_name | ||
WITH ( connector = 'blackhole', type = 'append-only', force_append_only = 'true'); |
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,3 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
DROP SINK nexmark_q105_without_limit; |
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,11 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
CREATE SINK nexmark_q105_without_limit AS | ||
SELECT | ||
a.id AS auction_id, | ||
a.item_name AS auction_item_name, | ||
COUNT(b.auction) AS bid_count | ||
FROM auction a | ||
JOIN bid b ON a.id = b.auction | ||
GROUP BY a.id, a.item_name | ||
WITH ( connector = 'blackhole', type = 'append-only', force_append_only = 'true'); |
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,3 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
DROP SINK nexmark_q106; |
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,21 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
CREATE SINK nexmark_q106 | ||
AS | ||
SELECT | ||
MIN(final) AS min_final | ||
FROM | ||
( | ||
SELECT | ||
auction.id, | ||
MAX(price) AS final | ||
FROM | ||
auction, | ||
bid | ||
WHERE | ||
bid.auction = auction.id | ||
AND bid.date_time BETWEEN auction.date_time AND auction.expires | ||
GROUP BY | ||
auction.id | ||
) | ||
WITH ( connector = 'blackhole', type = 'append-only', force_append_only = 'true'); |
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,3 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
DROP SINK nexmark_q107; |
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,11 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
CREATE SINK nexmark_q107 AS | ||
SELECT | ||
approx_percentile(0.01, 0.01) within group (order by price) as p01, | ||
approx_percentile(0.1, 0.01) within group (order by price) as p10, | ||
approx_percentile(0.5, 0.01) within group (order by price) as p50, | ||
approx_percentile(0.9, 0.01) within group (order by price) as p90, | ||
approx_percentile(0.99, 0.01) within group (order by price) as p99 | ||
FROM bid | ||
WITH ( connector = 'blackhole', type = 'append-only', force_append_only = 'true'); |
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,3 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
DROP SINK nexmark_q108; |
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,13 @@ | ||
-- test two-phase simple approx percentile and merge | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
CREATE SINK nexmark_q108 AS | ||
SELECT | ||
approx_percentile(0.01, 0.01) within group (order by price) as p01, | ||
approx_percentile(0.1, 0.01) within group (order by price) as p10, | ||
approx_percentile(0.5, 0.01) within group (order by price) as p50, | ||
approx_percentile(0.9, 0.01) within group (order by price) as p90, | ||
approx_percentile(0.99, 0.01) within group (order by price) as p99 | ||
FROM bid | ||
GROUP BY auction | ||
WITH ( connector = 'blackhole', type = 'append-only', force_append_only = 'true'); |
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,3 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
DROP SINK nexmark_q12_temporal_filter; |
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,7 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
CREATE SINK nexmark_q12_temporal_filter AS | ||
SELECT bidder, count(*) as bid_count, window_start, window_end | ||
FROM TUMBLE(bid_filtered, p_time, INTERVAL '10' SECOND) | ||
GROUP BY bidder, window_start, window_end | ||
WITH ( connector = 'blackhole', type = 'append-only', force_append_only = 'true'); |
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,4 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
DROP SINK nexmark_q13_by_row_id; | ||
DROP TABLE side_input; |
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 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
CREATE TABLE side_input( | ||
key BIGINT PRIMARY KEY, | ||
value VARCHAR | ||
); | ||
INSERT INTO side_input SELECT v, v::varchar FROM generate_series(0, ${BENCHMARK_NEXMARK_RISINGWAVE_Q13_SIDE_INPUT_ROW_COUNT} - 1) AS s(v); | ||
|
||
CREATE SINK nexmark_q13_by_row_id AS | ||
SELECT B.auction, B.bidder, B.price, B.date_time, S.value | ||
FROM bid B join side_input FOR SYSTEM_TIME AS OF PROCTIME() S on mod(B._row_id::bigint, ${BENCHMARK_NEXMARK_RISINGWAVE_Q13_SIDE_INPUT_ROW_COUNT}) = S.key | ||
WITH ( connector = 'blackhole', type = 'append-only', force_append_only = 'true'); |
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,4 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
DROP SINK nexmark_q13_non_lookup_cond; | ||
DROP TABLE side_input; |
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,14 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
CREATE TABLE side_input( | ||
key BIGINT PRIMARY KEY, | ||
value VARCHAR | ||
); | ||
INSERT INTO side_input SELECT v, v::varchar FROM generate_series(0, ${BENCHMARK_NEXMARK_RISINGWAVE_Q13_SIDE_INPUT_ROW_COUNT} - 1) AS s(v); | ||
|
||
CREATE SINK nexmark_q13_non_lookup_cond AS | ||
SELECT B.auction, B.bidder, B.price, B.date_time, S.value | ||
FROM bid B join side_input FOR SYSTEM_TIME AS OF PROCTIME() S | ||
ON mod(B.auction, ${BENCHMARK_NEXMARK_RISINGWAVE_Q13_SIDE_INPUT_ROW_COUNT}) = S.key | ||
AND S.key % 4 != 1 | ||
WITH ( connector = 'blackhole', type = 'append-only', force_append_only = 'true'); |
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 |
---|---|---|
@@ -1,11 +1,12 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
CREATE TABLE side_input( | ||
key BIGINT PRIMARY KEY, | ||
value VARCHAR | ||
key BIGINT PRIMARY KEY, | ||
value VARCHAR | ||
); | ||
INSERT INTO side_input SELECT i::bigint, i::varchar FROM(SELECT generate_series(0,9999,1) as i); | ||
INSERT INTO side_input SELECT v, v::varchar FROM generate_series(0, ${BENCHMARK_NEXMARK_RISINGWAVE_Q13_SIDE_INPUT_ROW_COUNT} - 1) AS s(v); | ||
|
||
CREATE SINK nexmark_q13 AS | ||
SELECT B.auction, B.bidder, B.price, B.date_time, S.value | ||
FROM bid B join side_input FOR SYSTEM_TIME AS OF PROCTIME() S on mod(B.auction, 10000) = S.key | ||
WITH ( connector = 'blackhole', type = 'append-only'); | ||
FROM bid B join side_input FOR SYSTEM_TIME AS OF PROCTIME() S on mod(B.auction, ${BENCHMARK_NEXMARK_RISINGWAVE_Q13_SIDE_INPUT_ROW_COUNT}) = S.key | ||
WITH ( connector = 'blackhole', type = 'append-only', force_append_only = 'true'); |
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,3 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
DROP SINK nexmark_q14_temporal_filter; |
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,26 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
CREATE SINK nexmark_q14_temporal_filter AS | ||
SELECT auction, | ||
bidder, | ||
0.908 * price as price, | ||
CASE | ||
WHEN | ||
extract(hour from date_time) >= 8 AND | ||
extract(hour from date_time) <= 18 | ||
THEN 'dayTime' | ||
WHEN | ||
extract(hour from date_time) <= 6 OR | ||
extract(hour from date_time) >= 20 | ||
THEN 'nightTime' | ||
ELSE 'otherTime' | ||
END AS bidTimeType, | ||
date_time | ||
-- extra | ||
-- TODO: count_char is an UDF, add it back when we support similar functionality. | ||
-- https://github.com/nexmark/nexmark/blob/master/nexmark-flink/src/main/java/com/github/nexmark/flink/udf/CountChar.java | ||
-- count_char(extra, 'c') AS c_counts | ||
FROM bid_filtered | ||
WHERE 0.908 * price > 1000000 | ||
AND 0.908 * price < 50000000 | ||
WITH ( connector = 'blackhole', type = 'append-only', force_append_only = 'true'); |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
-- noinspection SqlNoDataSourceInspectionForFile | ||
-- noinspection SqlResolveForFile | ||
DROP SINK nexmark_q14; | ||
DROP FUNCTION count_char; | ||
DROP FUNCTION count_char; |
Oops, something went wrong.