bug: CDC Date clamping consistent with initial load limits#4600
Merged
Conversation
❌ 8 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
Contributor
❌ Test FailureAnalysis: A real bug: the cdc/date-clamping PR fails Test_MySQL_DateTime_ClickHouse_Range deterministically across all 4 ClickHouse suite variants because out-of-range MySQL DATETIME values aren't clamped to the 1900-01-01 boundary (got raw 1000-06-15), indicating incomplete DATETIME64 clamping logic. |
…Null` is used for normalization.
pfcoperez
marked this pull request as ready for review
July 20, 2026 15:42
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
pfcoperez
enabled auto-merge (squash)
July 20, 2026 17:21
pfcoperez
disabled auto-merge
July 20, 2026 17:21
pfcoperez
enabled auto-merge (squash)
July 20, 2026 17:21
serprex
reviewed
Jul 20, 2026
pfcoperez
force-pushed
the
cdc/date-clamping
branch
from
July 20, 2026 20:50
39f6d63 to
09ca7ae
Compare
ilidemi
approved these changes
Jul 21, 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.
In #4534 we added logic to proactively clamp dates to CH Date32 limits at the time.
However, the scope of that change didn't include CDC. CDC normalization was therefore constrained by ClickHouse's
parseDateTime64BestEffortOrNulllimits.These limits changed with with ClickHouse/ClickHouse#107907 leaving initial loads and cdc supported date ranges inconsistent with each other.
This PR aligns CDC to use the same limits as initial load.
From now this is a constant to
[1900-01-01, 2299-12-31]but might want to follow up with a piece of functionality probing destination CH valid ranges to make the most of the target CH version capabilities.