[FLINK-39034][runtime] Preserve timestamps in SortPartitionOperator#28644
Open
Jackeyzhe wants to merge 1 commit into
Open
[FLINK-39034][runtime] Preserve timestamps in SortPartitionOperator#28644Jackeyzhe wants to merge 1 commit into
Jackeyzhe wants to merge 1 commit into
Conversation
Collaborator
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.
What is the purpose of the change
SortPartitionOperatorcurrently writes only record values into the external sorter for non-key-selector sorting. When records are emitted after sorting, this recreates output records without preserving the originalStreamRecordtimestamp state.This change stores
StreamRecordinstances in the sorter and compares their wrapped values through aStreamRecordComparator, so sorted output preserves whether the input record had a timestamp and, when present, the original timestamp.Brief change log
StreamRecord<INPUT>in the non-key-selector sorter path.StreamRecordComparatorto compare records by their wrapped values while preserving stream record metadata.SortPartitionOperatorTestto verify sorted output keeps timestamps and no-timestamp records remain timestamp-less.Verifying this change
This change is covered by existing and extended tests.
Verified locally with:
./mvnw -pl flink-runtime -am -Dtest=SortPartitionOperatorTest -Dsurefire.failIfNoSpecifiedTests=false testThe target test passed with 2 tests, 0 failures, 0 errors, and 0 skipped.
Does this pull request potentially affect one of the following parts:
@Public(Evolving): noDocumentation
Was generative AI tooling used to co-author this PR?
Generated-by: OpenAI GPT-5.5, reviewd by human
I'm responsible for the quality and correctness of every change in this PR regardless of the tooling used.