Closed Tom-hayden closed 3 years ago
This sounds like it is due to the way the random value generator selects values from the set. I suspect this is where we need to look.
It gives the appearance that it is randomly selecting 0 or 1 where is should be randomly selecting from (in effect) 0,1,1,1,1,1,1,1,1,1 (or using the weightings to select the value).
With random, each row is independently produced, as such one row does impact the weighing of available values for a field in the next row. This is probably where the change is supposed to be, but could be patched with a pre-projection of weighted values like above (0,1,1,1,1,1,1,1,1,1)
This bug seems to be a duplicate of #1704 suggest that it is closed and #1704 is used to track and resolve the issue.
Bug report
Using an inSet Constraint with weights alongside an if constraint appears to not be working correctly. The weights are ignored. Related to https://github.com/finos/datahelix/issues/1704
Steps to reproduce:
Using the profile
With the csv file
percent10.csv
Run datahelix in random mode. Here are the command line arguments I used to run the profile:
Expected result:
around 90% of names are null.
Actual result:
Additional context:
This appears to be an issue with the ordering the constraints are evaluated in. See line68 RowSpecTreeSolver for a potential starting point.