Closed
Conversation
8dc8152 to
eda1992
Compare
Collaborator
Author
cb8a503 to
57327e3
Compare
danny0405
reviewed
Dec 22, 2023
| public Comparable<?> getOrderingValue(Schema recordSchema, Properties props) { | ||
| return this.getData().getOrderingValue(); | ||
| // For non-delete record. | ||
| if (data != null) { |
Contributor
There was a problem hiding this comment.
The data is designed to be non-null, we even have some validation logic for it in HoodieRecord:
public T getData() {
if (data == null) {
throw new IllegalStateException("Payload already deflated for record.");
}
return data;
}
Collaborator
Author
There was a problem hiding this comment.
We can check the metadata first in the validation.
57327e3 to
d311264
Compare
Collaborator
Author
|
Will clean the failures. |
36f0142 to
c3779c9
Compare
c3779c9 to
3d71d1c
Compare
Collaborator
Contributor
|
Thanks for raising this fix, I think it is a good chance we fix the event time sequence comparison of delete records with payloads, I can see 2 mistaks in our code that uses processing time sequence for deletes:
public OverwriteWithLatestAvroPayload preCombine(OverwriteWithLatestAvroPayload oldValue) {
if (oldValue.recordBytes.length == 0) {
// use natural order for delete record
return this;
}
...
}
public Option<IndexedRecord> combineAndGetUpdateValue(IndexedRecord currentValue, Schema schema, Properties properties) throws IOException {
if (recordBytes.length == 0) {
return Option.empty();
}
...
}In any case, the |
yihua
reviewed
Sep 19, 2024
Contributor
yihua
left a comment
There was a problem hiding this comment.
Closing this PR as we should revisit the delete ordering overall.
This file contains hidden or 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
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.
Change Logs
Impact
Simplifies the logic for handling delete records.
Risk level (write none, low medium or high below)
Low.
Contributor's checklist