You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nullQuota not working on number attributes, generator is always created as "ConstantGenerator(null, ...)" because parameter "SimpleTypeGeneratorFactory.createSpecificGenerator(..., nullable, ...)" (line 137ff) is not "false" .
To Reproduce
I created a simple "setup" which should create 20 datasets for ints, one without nullQuota, one with a "nullQuota" of "0.5".
On execution I'd expect, that on any entry the "number0" is filled with a random int number, that's what's happened.
I also expect that on about half the entries the "number1" is filled with a random int number, the rest of the entries have "number1" filled with "null".
I suspect, the "nullable" parameter, derived within the "InstanceGeneratorFactory.createSingleInstanceGenerator(...) (line 59ff, derived at line 81) is not completely correct for the generator, since "nullQuota" "null" values should be created by some null-creator-wrapper, whereas the generator itself should always return non null values.
I hope my report is sufficient.
Maybe I have a big misunderstanding on attribute generation and nullQuotas.
Maybe I have just to set a "defaultNullQuota" ("context.getGeneratorFactory().getDefaultsProvider().defaultNullQuota() queried in "TypeGeneratorFactory.shouldNullifyEachNullable(...)") but I don't know how.
The text was updated successfully, but these errors were encountered:
Hey , thanks for using Benerator and for your detailed report. We are checking this and come back to you ASAP ... but first impression , it seems like a bug .
Describe the bug
nullQuota not working on number attributes, generator is always created as "
ConstantGenerator(null, ...)
" because parameter "SimpleTypeGeneratorFactory.createSpecificGenerator(..., nullable, ...)
" (line 137ff) is not "false
" .To Reproduce
I created a simple "
setup
" which should create 20 datasets for ints, one without nullQuota, one with a "nullQuota
" of "0.5
".Output:
Expected behavior
On execution I'd expect, that on any entry the "
number0
" is filled with a random int number, that's what's happened.I also expect that on about half the entries the "
number1
" is filled with a random int number, the rest of the entries have "number1
" filled with "null
".Suspections
I suspect, the "
nullable
" parameter, derived within the "InstanceGeneratorFactory.createSingleInstanceGenerator(...)
(line 59ff, derived at line 81) is not completely correct for the generator, since "nullQuota
" "null
" values should be created by some null-creator-wrapper, whereas the generator itself should always return non null values.Benerator Version
I hope my report is sufficient.
Maybe I have a big misunderstanding on attribute generation and nullQuotas.
Maybe I have just to set a "
defaultNullQuota
" ("context.getGeneratorFactory().getDefaultsProvider().defaultNullQuota()
queried in "TypeGeneratorFactory.shouldNullifyEachNullable(...)
") but I don't know how.The text was updated successfully, but these errors were encountered: