-
Notifications
You must be signed in to change notification settings - Fork 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
[common][flink] Add support for complex types in kafka debezium avro cdc action #4246
[common][flink] Add support for complex types in kafka debezium avro cdc action #4246
Conversation
CC @yuzelin to take a reivew~ |
Thanks @AshishKhatkar |
if (precision < 9) { | ||
nanos = | ||
(int) | ||
(Math.floor(nanos / Math.pow(10, 9 - precision)) | ||
* Math.pow(10, 9 - 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.
I think this is unnecessary. We can store the data and let the readers truncate the data based on precision.
So we can just use Timestamp#fromEpochMillis(long milliseconds, int nanosOfMillisecond)
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.
I read the documentation for Timestamp#fromEpochMillis(long milliseconds, int nanosOfMillisecond)
and it expects nanosOfMs to be in range [0, 999_999]. Are you saying we need to default to precision 6 here?
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.
For example, if we want to store 1970-01-01 00:00:00.123456789
, the first argument milliseconds
is 123
and the second argument nanosOfMillisecond
is 456789
.
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.
@yuzelin done.
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.
Thanks~
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.
Thanks,@AshishKhatkar! I left a comment, please take a look~
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.
+1
Purpose
@umeshdangat has an outstanding PR which was updated after PR by @zhuangchong was merged. That PR: #3323
The above patch allows consuming data from avro data from kafka into paimon but it doesnt support complex avro types. This PR achieves that. The original PR zhuangchong#1 was pointing to @zhuangchong branch to clearly show the changes only relavant to supporting complex avro types.
This PR fixes the failing E2E tests for PR: #3931
Copying the note from PR: #3931
@JingsongLi @zhuangchong let us know what you think.
cc: @umeshdangat
Linked issue: close xxx
Tests
API and Format
Documentation