fix: update timestamp layout and parsing method in Proton configuration#47
Merged
fix: update timestamp layout and parsing method in Proton configuration#47
Conversation
Collaborator
Author
|
updated new test case:
|
|
Case verified on old/new version tools and works as expected. |
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.
Fix #46
Issue Description
The issue occurs when incremental mode insert is used, and sling tries to directly compare UTC (CSV) with UTC+8 (Proton). The comparison is performed using
to_time, which is not smart enough to detect the timezone properly.Reproduction Steps
1. Create 2 streams in Proton
CREATE STREAM src ( `id` int64, `_tp_time` datetime64(3, 'Asia/Shanghai') DEFAULT now64(3, 'Asia/Shanghai') CODEC(DoubleDelta, LZ4) ); CREATE STREAM tgt ( `id` int64, `_tp_time` datetime64(3, 'Asia/Shanghai') DEFAULT now64(3, 'Asia/Shanghai') CODEC(DoubleDelta, LZ4) );2. Insert an older record
3. Run Proton → CSV → Proton transfer
4. Insert a new record (gap between newer and older records is less than 8 hours)
5. Run Proton → CSV → Proton transfer again
6. Verify the final count
Expected vs Actual Results