shuwenwei opened a new pull request, #719: URL: https://github.com/apache/tsfile/pull/719
## 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: * Incorrect time-value pairing * Inconsistent rewritten chunks * Potential query correctness issues after type modification ## Solution This PR fixes the issue by reconstructing a clean time chunk before rewrite: * A new Chunk is created from the original time chunk’s header, data, statistics, and encryption parameters * Deletion intervals are intentionally removed from the time chunk used by TableChunkReader * The rewrite process now iterates over fully aligned time-value pairs This guarantees that the rewritten value chunk remains correctly aligned with the time chunk, even when time deletions exist. ## Impact * Ensures correctness when rewriting value chunks with a new data type * Fixes potential time-value misalignment caused by time deletions * No behavior change for cases without deletions -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
