-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Custom convert incoming long for date and datetime types #36263
Custom convert incoming long for date and datetime types #36263
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
return localDateTime.format(DateTimeFormatter.ofPattern(DATETIME_FORMAT_MICROSECONDS)); | ||
} | ||
|
||
if (input instanceof final Long d) { |
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.
Is it the case that for Mssql that all timestamp 'numbers' are always with nanosecond precision?
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.
We're only seeing this Long input when values are converted as part of acquiring schema history.
Dates on actual row records are still seen as incoming TimeStamp
. None of this is documented anywhere as far as I can tell.
We need to take a close look at some point as this area is uneven in terms of implementation.
And some of the code here is almost three years old.
/publish-java-cdk dry-run=true
|
…ng-mssql-first-sync-long-cannot-be-cast-to-class-javasqltimestamp
/publish-java-cdk
|
Date types included in tables as default values are discovered in debezium with an input of either epoch milliseconds (for Datetime types) or epoch days (for date type).
Our custom converter couldn't convert this input.
Added correct conversion for schema history phase.
Actual record Dates are still seen as an incoming TimeStamp.