Skip to content

Commit

Permalink
Tune down generation of null values in LogsDB data generation (elasti…
Browse files Browse the repository at this point in the history
…c#112890)

Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
lkts and elasticmachine authored Sep 16, 2024
1 parent a016f78 commit 0bedb86
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ public DataSourceResponse.ArrayWrapper handle(DataSourceRequest.ArrayWrapper ign
}

private static Function<Supplier<Object>, Supplier<Object>> injectNulls() {
return (values) -> () -> ESTestCase.randomBoolean() ? null : values.get();
// Inject some nulls but majority of data should be non-null (as it likely is in reality).
return (values) -> () -> ESTestCase.randomDouble() <= 0.05 ? null : values.get();
}

private static Function<Supplier<Object>, Supplier<Object>> wrapInArray() {
Expand Down

0 comments on commit 0bedb86

Please sign in to comment.