mirror of https://github.com/apache/nifi.git
NIFI-11031: Fix logic error in GenerateRecord for nullPercentage
This closes #6830 Signed-off-by: David Handermann <exceptionfactory@apache.org>
This commit is contained in:
parent
e966336e89
commit
4f77a17d19
|
@ -296,7 +296,7 @@ public class GenerateRecord extends AbstractProcessor {
|
|||
}
|
||||
|
||||
private Object generateValueFromRecordField(RecordField recordField, Faker faker, int nullPercentage) {
|
||||
if (recordField.isNullable() && faker.number().numberBetween(0, 100) <= nullPercentage) {
|
||||
if (recordField.isNullable() && faker.number().numberBetween(0, 100) < nullPercentage) {
|
||||
return null;
|
||||
}
|
||||
switch (recordField.getDataType().getFieldType()) {
|
||||
|
|
Loading…
Reference in New Issue