Skip to content

Commit

Permalink
feat(test): add nexmark-q15-two-phase for flamegraph generation (#1…
Browse files Browse the repository at this point in the history
…3234)

Co-authored-by: Noel Kwan <[email protected]>
  • Loading branch information
st1page and kwannoel authored Nov 3, 2023
1 parent 69793d6 commit 244017c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ci/scripts/sql/nexmark/q15-two-phase.drop.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- noinspection SqlNoDataSourceInspectionForFile
-- noinspection SqlResolveForFile
DROP SINK nexmark_q15_two_phase;
21 changes: 21 additions & 0 deletions ci/scripts/sql/nexmark/q15-two-phase.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-- noinspection SqlNoDataSourceInspectionForFile
-- noinspection SqlResolveForFile
SET rw_force_split_distinct_agg = true;
SET rw_force_two_phase_agg = true;
CREATE SINK nexmark_q15_two_phase AS
SELECT to_char(date_time, 'YYYY-MM-DD') as "day",
count(*) AS total_bids,
count(*) filter (where price < 10000) AS rank1_bids,
count(*) filter (where price >= 10000 and price < 1000000) AS rank2_bids,
count(*) filter (where price >= 1000000) AS rank3_bids,
count(distinct bidder) AS total_bidders,
count(distinct bidder) filter (where price < 10000) AS rank1_bidders,
count(distinct bidder) filter (where price >= 10000 and price < 1000000) AS rank2_bidders,
count(distinct bidder) filter (where price >= 1000000) AS rank3_bidders,
count(distinct auction) AS total_auctions,
count(distinct auction) filter (where price < 10000) AS rank1_auctions,
count(distinct auction) filter (where price >= 10000 and price < 1000000) AS rank2_auctions,
count(distinct auction) filter (where price >= 1000000) AS rank3_auctions
FROM bid
GROUP BY to_char(date_time, 'YYYY-MM-DD')
WITH ( connector = 'blackhole', type = 'append-only', force_append_only = 'true');

0 comments on commit 244017c

Please sign in to comment.