[Fix][Connector-V2] Fix NullPointerException when column or tag contains null value in TDengine sink#9158
Merged
Merged
Conversation
8156917 to
27fe470
Compare
Member
|
Could you add a unit test for this? |
edcf6a9 to
27fe470
Compare
27fe470 to
2cd1707
Compare
Contributor
Author
|
@Hisoka-X I have added a unit test for the function I changed. Could you please review this PR? |
Hisoka-X
reviewed
Apr 15, 2025
| } | ||
|
|
||
| @Test | ||
| void testConvertDataType_withNull() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException { |
Member
There was a problem hiding this comment.
Suggested change
| void testConvertDataType_withNull() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException { | |
| void testConvertDataTypeWithNull() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException { |
Comment on lines
+100
to
+101
| Method method = TDengineSinkWriter.class.getDeclaredMethod("convertDataType", Object[].class); | ||
| method.setAccessible(true); |
Member
There was a problem hiding this comment.
It's better to not use reflect. Let's change convertDataType scope to default. Then add a annotation @VisibleForTesting.
Member
|
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 |
Contributor
Author
|
I have re-optimized the relevant functions based on your suggestions. Thank you! |
Member
58fd50f to
99e18b2
Compare
e2f3ca9 to
99e18b2
Compare
99e18b2 to
34f3890
Compare
Contributor
Author
|
I have fix the test case. |
Hisoka-X
approved these changes
Apr 15, 2025
Member
|
Thanks @jia17 |
hailin0
approved these changes
Apr 16, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

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.