-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
fix(merge transform): Support nested fields and arrays #1936
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…es_matter These are designed to help with ensuring the nested fields are properly supported. The design is as follows: - The `map_values_key_order` test checks that the discriminant for two values with different key order still produce the same discriminant; this will pass without nested fields support (i.e. on current master), but not because it correctly distinguishes the streams - but because the map values are not considered for comparison at all. For the purpose of the discriminant, events are the same because no fields contributed to the calculation. The invariant is still checked and passes. But to ensure the actual correctness, the second test - `map_values_matter` - is added. - The `map_values_matter` test checks that nested fields do actually contribute to the discriminant calculation. Signed-off-by: MOZGIII <mike-n@narod.ru>
This ensures the Map values are not confused with other variants, and also validates another edge case that has to be properly supported for proper nested field implementation - that `Value::Map` values are not ignored. - rename `map_values_matter` to `map_values_matter_1` - add `map_values_matter_2` Signed-off-by: MOZGIII <mike-n@narod.ru>
Let's keep this PR open until the tests are fixed. |
Signed-off-by: Alexander Rodin <rodin.alexander@gmail.com>
…-nested-events-semantics-rebase Signed-off-by: Alexander Rodin <rodin.alexander@gmail.com>
Signed-off-by: Alexander Rodin <rodin.alexander@gmail.com>
Great PR! Please pay attention to the following items before merging: Files matching
This is an automatically generated QA checklist based on modified files |
Signed-off-by: Alexander Rodin <rodin.alexander@gmail.com>
ghost
changed the title
fix(testing): Discriminant nested events semantics (rebase)
fix(merge transform): Support nested fields and arrays
Mar 16, 2020
This pull request was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR supersedes #1825. We couldn't advance with that approach, so we have to try again.
This is merely a rebase to
master
after #1902 has been merged.So, the core problem is the
Map
values don't respect the invariants required by theDiscriminant
. This PR adds tests, that demonstrate the failure scenario. For things to work properly, all tests introduced in this PR have to pass.This PR only adds tests that now fail. What to do with this PR is a question to me. We can merge it to master to force-break it, and then fix it later, or we can add fix here and then merge it.
/cc @a-rodin