Fix value and time chunk misalignment when rewriting with time deletion#719
Merged
JackieTien97 merged 1 commit intoapache:developfrom Feb 3, 2026
Merged
Conversation
JackieTien97
approved these changes
Feb 3, 2026
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.
Background
When rewriting a value chunk to a new data type, the rewrite logic relies on
TableChunkReader to iterate over time-value pairs using the provided time
chunk and value chunk.
However, in the presence of time deletions, the original implementation
passed the original timeChunk directly into TableChunkReader. Since the
time chunk still contained deletion intervals, the filtered time sequence could
become inconsistent with the value chunk being rewritten.
Problem
With time deletions applied, the rewritten value chunk could contain points
that are not properly aligned with the corresponding timestamps in the time
chunk. This results in:
Solution
This PR fixes the issue by reconstructing a clean time chunk before rewrite:
statistics, and encryption parameters
TableChunkReader
This guarantees that the rewritten value chunk remains correctly aligned with
the time chunk, even when time deletions exist.
Impact