-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Add ignore_malformed and null_values to test data generation #121983
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
| } | ||
|
|
||
| private static boolean matchCountsEqualExact(List<String> actualNormalized, List<String> expectedNormalized) { | ||
| HashMap<String, Integer> counts = new HashMap<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: let's use TreeMap for maps, it helps with debugging..
| } | ||
| } | ||
|
|
||
| return counts.isEmpty(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we want to return something about the delta? Maybe return a string for counts, or null?
| * @return | ||
| */ | ||
| static Supplier<Object> defaults(Supplier<Object> rawValues, DataSource dataSource) { | ||
| var nulls = dataSource.get(new DataSourceRequest.NullWrapper()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I missed the null value inject, do we have existing logic that randomly injects nulls, or the null_value if one is provided?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do.
kkrik-es
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks painful.
💚 Backport successful
|
This PR adds generation of
null_valueandignore_malformed(including malformed values generation) mapping parameters to fields that support them (number fields). This is done in preparation to work on a fallback synthetic source block loader for number fields since the test infra is shared.