Retain the order of multiple dictionary items added via Delta #229
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 change allows for the retention of insertion order when multiple dictionary items are added via a
Delta.Note: this change only accounts for retaining the order for
dictionary_item_addedsince the keys, when sorted viaDelta::_do_item_added, may end up being arbitrarily re-ordered prior to applying them to the resulting data set. I use the word "arbitrarily" here as the order of a given added key does not affect the addition of any other key to the dictionary.Example:
In certain situations, it may be desired to retain the original order of the items added to the
t2data set when applying theDelta. The expected result would be the following:{ 'oranges': 1, 'cucumbers': 2, 'bananas': 3, 'pumpkins': 4, 'apples': 5 }Note: Please let me know if the unit test does not conform to the existing ones and I can update, if necessary.