-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[Fix][Connector-V2] Fix NullPointerException when column or tag contains null value in TDengine sink #9158
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
Conversation
8156917 to
27fe470
Compare
|
Could you add a unit test for this? |
edcf6a9 to
27fe470
Compare
27fe470 to
2cd1707
Compare
|
@Hisoka-X I have added a unit test for the function I changed. Could you please review this PR? |
| } | ||
|
|
||
| @Test | ||
| void testConvertDataType_withNull() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException { |
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.
| void testConvertDataType_withNull() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException { | |
| void testConvertDataTypeWithNull() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException { |
| Method method = TDengineSinkWriter.class.getDeclaredMethod("convertDataType", Object[].class); | ||
| method.setAccessible(true); |
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.
It's better to not use reflect. Let's change convertDataType scope to default. Then add a annotation @VisibleForTesting.
|
Also please follow the guide to open github action on your fork repository. Thanks! https://github.com/apache/seatunnel/pull/9158/checks?check_run_id=40516607099 |
|
I have re-optimized the relevant functions based on your suggestions. Thank you! |
58fd50f to
99e18b2
Compare
e2f3ca9 to
99e18b2
Compare
99e18b2 to
34f3890
Compare
|
I have fix the test case. |
|
Thanks @jia17 |

Purpose of this pull request
Fix #9104
Does this PR introduce any user-facing change?
no
How was this patch tested?
test in local
Check list
New License Guide
release-note.