apache_beam.testing.benchmarks.nexmark.queries.winning_bids module¶
A transform to find winning bids for each closed auction. In pseudo CQL syntax:
SELECT Rstream(A.*, B.auction, B.bidder, MAX(B.price), B.dateTime) FROM Auction A [ROWS UNBOUNDED], Bid B [ROWS UNBOUNDED] WHERE A.id = B.auction AND B.datetime < A.expires AND A.expires < CURRENT_TIME GROUP BY A.id
We will also check that the winning bid is above the auction reserve. Note that we ignore the auction opening bid value since it has no impact on which bid eventually wins, if any.
Our implementation will use a custom windowing function in order to bring bids and auctions together without requiring global state.
-
class
apache_beam.testing.benchmarks.nexmark.queries.winning_bids.
AuctionOrBidWindow
(start, end, auction_id, is_auction_window)[source]¶ Bases:
apache_beam.transforms.window.IntervalWindow
Windows for open auctions and bids.
-
class
apache_beam.testing.benchmarks.nexmark.queries.winning_bids.
AuctionOrBidWindowCoder
[source]¶ Bases:
apache_beam.coders.coders.FastCoder
-
class
apache_beam.testing.benchmarks.nexmark.queries.winning_bids.
AuctionOrBidWindowCoderImpl
[source]¶ Bases:
apache_beam.coders.coder_impl.StreamCoderImpl
-
class
apache_beam.testing.benchmarks.nexmark.queries.winning_bids.
AuctionOrBidWindowFn
(expected_duration_micro)[source]¶
-
class
apache_beam.testing.benchmarks.nexmark.queries.winning_bids.
JoinAuctionBidFn
(*unused_args, **unused_kwargs)[source]¶