The current code for BidGenerator.nextBid incorrectly adds the FIRST_PERSON_ID two times to the value returned by nextBase0PersonId() call (see lines 84 and 100 below):
|
bidder += GeneratorConfig.FIRST_PERSON_ID; |
|
|
|
long price = PriceGenerator.nextPrice(random); |
|
|
|
String channel; |
|
String url; |
|
if (random.nextInt(HOT_CHANNELS_RATIO) > 0) { |
|
int i = random.nextInt(HOT_CHANNELS.length); |
|
channel = HOT_CHANNELS[i]; |
|
url = HOT_URLS[i]; |
|
} else { |
|
Tuple2<String, String> channelAndUrl = CHANNEL_URL_CACHE.get(random.nextInt(CHANNELS_NUMBER)); |
|
channel = channelAndUrl.f0; |
|
url = channelAndUrl.f1; |
|
} |
|
|
|
bidder += GeneratorConfig.FIRST_PERSON_ID; |
I only noticed because I'm writing unit-tests (to better understand what each function intends) while porting the data source to rust and my test failed :P.
Or if there is some reason why the FIRST_PERSON_ID is added twice intentionally, perhaps place those together with a comment - but as it is, I'm assuming it's unintended.
The current code for
BidGenerator.nextBidincorrectly adds theFIRST_PERSON_IDtwo times to the value returned bynextBase0PersonId()call (see lines 84 and 100 below):nexmark/nexmark-flink/src/main/java/com/github/nexmark/flink/generator/model/BidGenerator.java
Lines 84 to 100 in 54974ef
I only noticed because I'm writing unit-tests (to better understand what each function intends) while porting the data source to rust and my test failed :P.
Or if there is some reason why the
FIRST_PERSON_IDis added twice intentionally, perhaps place those together with a comment - but as it is, I'm assuming it's unintended.