-
Notifications
You must be signed in to change notification settings - Fork 392
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
[#5533] fix (trino-connector): Fix the exception of ArrayIndexOutOfBoundsException when execute COMMENT COLUMN command #6182
Conversation
@@ -109,17 +110,19 @@ String runQueryOnce(String query) { | |||
session = builder.build(); | |||
queryRunner.setSession(session); | |||
} | |||
return outputStream.toString(); | |||
|
|||
// avoid the ide capturing the error message as failure |
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.
avoid -> Avoid
ide -> IDE
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.
fix
|
||
public static String toSimpleErrorMessage(Exception e) { | ||
List<String> lines = e.getMessage().lines().toList(); | ||
return lines.size() > 1 ? lines.get(0) + lines.get(1) : lines.get(0); |
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.
Would we only output the first two lines of the error message?
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.
Yes, the client doesn't need to see the stack trace in the error message.
…undsException when execute COMMENT COLUMN command (#6182) ### What changes were proposed in this pull request? Fix the exception of ArrayIndexOutOfBoundsException when handle error message of IllegalArgumentException ### Why are the changes needed? Fix: #5533 ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? IT
…utOfBoundsException when execute COMMENT COLUMN command (apache#6182) ### What changes were proposed in this pull request? Fix the exception of ArrayIndexOutOfBoundsException when handle error message of IllegalArgumentException ### Why are the changes needed? Fix: apache#5533 ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? IT
What changes were proposed in this pull request?
Fix the exception of ArrayIndexOutOfBoundsException when handle error message of IllegalArgumentException
Why are the changes needed?
Fix: #5533
Does this PR introduce any user-facing change?
No
How was this patch tested?
IT