-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[Improve] JdbcInputFormat nextRecord Exception throw TableId #9374
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
|
Previous abnormal information |
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.
Pull Request Overview
This PR improves the exception messages in JdbcInputFormat#nextRecord by including the table identifier in the error output.
- SQLException error message now displays the table id along with the original error details
- NullPointerException message is updated to include table id for better context
Comments suppressed due to low confidence (2)
seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/JdbcInputFormat.java:159
- The updated SQLException message improves clarity by including the table identifier. Consider reviewing the phrasing for consistency across similar messages in the codebase.
String.format("Failed to read data from table '%s': %s", splitTableId, se.getMessage()),
seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/JdbcInputFormat.java:167
- The NullPointerException message could be made a bit more descriptive by stating 'NullPointerException occurred' instead of 'NullPointer encountered' to improve consistency and clarity.
String.format("Failed to access resultSet for table '%s': NullPointer encountered", splitTableId),
| CommonErrorCodeDeprecated.SQL_OPERATION_FAILED, | ||
| "Couldn't access resultSet", | ||
| String.format( | ||
| "Failed to access resultSet for table '%s': NullPointer encountered", |
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.
| "Failed to access resultSet for table '%s': NullPointer encountered", | |
| "Failed to access resultSet for table '%s': NullPointerException occurred", |
|
waiting test case passes. |
Purpose of this pull request
Does this PR introduce any user-facing change?
How was this patch tested?
Check list
New License Guide