apache_beam.testing.benchmarks.nexmark.queries.query5 module¶
Query 5, ‘Hot Items’. Which auctions have seen the most bids in the last hour (updated every minute). In CQL syntax:
SELECT Rstream(auction)
FROM (SELECT B1.auction, count(*) AS num
FROM Bid [RANGE 60 MINUTE SLIDE 1 MINUTE] B1
GROUP BY B1.auction)
WHERE num >= ALL (SELECT count(*)
FROM Bid [RANGE 60 MINUTE SLIDE 1 MINUTE] B2
GROUP BY B2.auction);
To make things a bit more dynamic and easier to test we use much shorter windows, and we’ll also preserve the bid counts.
-
class
apache_beam.testing.benchmarks.nexmark.queries.query5.
MostBidCombineFn
(*unused_args, **unused_kwargs)[source]¶ Bases:
apache_beam.transforms.core.CombineFn
combiner function to find auctions with most bid counts