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.
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
test(connector): add test cases for debezium json test #8334
test(connector): add test cases for debezium json test #8334
Changes from 6 commits
1182879
987f3df
20b3951
640159f
21478a3
b5e618f
f8d42bf
000a6a6
c392031
ba30d2b
a97f049
6feeb6b
28053a1
920fb1b
8b42462
d7fb4f9
6f31da6
d55c85f
f81acdf
54651ce
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
please cover overflow cases
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.
as for the overflow cases...
when inserting data into mysql, if there is overflow, mysql will throw an error:
so it's possibly unlikely that debezium will generate overflowing values...?
I can also try to modify the json generated by debezium and see if the parser catches the error
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.
debezium is unlikely to deliver the corrupted data but we still may face it when the data comes from kafka.
Just mock some test cases and see if rw catches the error.
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.
please cover corner cases
for date:
1000-01-01
and9999-12-31
for time:
-838:59:59
and838:59:59
for datetime:
1000-01-01 00:00:00
and9999-12-31 23:59:59
for timestamp:
'1970-01-01 00:00:01' UTC
and'2038-01-09 03:14:07' UTC
(and other timezones)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 for your comments bohan! i am wondering what is the expected behavior when converting mysql time to postgres time (since risingwave is postgres compatible)...
https://support.huaweicloud.com/intl/en-us/productdesc-drs/drs_01_0324.html
I guess we can either let it overflow, or convert it to 00:00:00 as above...?
after discussion with @xiangjinwu we can either do the following
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.
If the value is out of range of RisingWave's type, which means the data may have been corrupted in upstream. Thus we can report an out-of-range (e.g. underflow, overflow) error to log and skip this row.
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.
Sure, I mean we should cover them in test cases and document the behavior.