change the data processing order in changelog #449
Merged
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.
change the data processing order in changelog.
For example:
The output will be
2
, it should be0
.Because a piece of data is inserted and then deleted, there should be no data.Thesum_distinct
will encountered the same problemThe previous processing strategy was to divide two chunks according to the delta value. The data with a delta value of -1 is placed in the first chunk, and the data with a delta value of 1 is placed in the second chunk(take the example above, it will be
[(2, 1, -1), (3, 2, -1),(2, 1, 1), (3, 2, 1)]
). Therefore, the data with a delta value of -1 will be placed in the first chunk. will be processed first, which is inconsistent with the order of data input.The current strategy is putting consecutive data with the same _tp_delta value in a chunk.
If the input chunk delta flags are
[1, 1, 1, -1, -1, 1, 1, 1]
.We will split into 3 chunks:[[1, 1, 1], [-1, -1], [1, 1, 1]]
.This not only ensures that the order of data processing is consistent with the input, but also ensures that the _tp_delta values in the same chunk are the same.
this closes #448