-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix temporal type default value bug mysql #15917
Conversation
/test connector=connectors/source-mysql
Build PassedTest summary info:
|
return DateTimeConverter.convertToTime(LocalTime.ofNanoOfDay(l)); | ||
} | ||
return DateTimeConverter.convertToTime(x); | ||
case "TIMESTAMP": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just curious: did you test with different precisions? It seems kind of weird that debezium would have special handling for datetime but not timestamp (and that timestamp
isn't actually in their table >.> )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup. They have listed it in the docs as well
Excluding the TIMESTAMP data type, MySQL temporal types depend on the value of the time.precision.mode connector configuration property.
}; | ||
switch (fieldType.toUpperCase(Locale.ROOT)) { | ||
case "DATETIME": | ||
if (x instanceof Long) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: x instanceof Long l
NOTE
|
/publish connector=connectors/source-mysql
if you have connectors that successfully published but failed definition generation, follow step 4 here |
NOTE
|
/publish connector=connectors/source-mysql-strict-encrypt
if you have connectors that successfully published but failed definition generation, follow step 4 here |
this worked great, thanks so much for the fast turnaround @subodh1810 ! |
* fix handling for temporal data type columns with default values * add tests * minor NIT comment * bump version * auto-bump connector version [ci skip] Co-authored-by: Octavia Squidington III <[email protected]>
Issue : #15840
The bug is happening for datetime, time and date data types with default values. While building the internal schema of the columns, debezium is failing with the error.