Re: [PR] [#5533] fix (trino-connector): Fix the exception of ArrayIndexOutOfBoundsException when execute COMMENT COLUMN command [gravitino]
jerryshao merged PR #6201: URL: https://github.com/apache/gravitino/pull/6201 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] [#5533] fix (trino-connector): Fix the exception of ArrayIndexOutOfBoundsException when execute COMMENT COLUMN command [gravitino]
jerryshao closed pull request #6201: [#5533] fix (trino-connector): Fix the exception of ArrayIndexOutOfBoundsException when execute COMMENT COLUMN command URL: https://github.com/apache/gravitino/pull/6201 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] [#5533] fix (trino-connector): Fix the exception of ArrayIndexOutOfBoundsException when execute COMMENT COLUMN command [gravitino]
jerryshao merged PR #6182: URL: https://github.com/apache/gravitino/pull/6182 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] [#5533] fix (trino-connector): Fix the exception of ArrayIndexOutOfBoundsException when execute COMMENT COLUMN command [gravitino]
diqiu50 commented on code in PR #6182:
URL: https://github.com/apache/gravitino/pull/6182#discussion_r1912416229
##
trino-connector/trino-connector/src/main/java/org/apache/gravitino/trino/connector/GravitinoErrorCode.java:
##
@@ -64,4 +65,9 @@ public enum GravitinoErrorCode implements ErrorCodeSupplier {
public ErrorCode toErrorCode() {
return errorCode;
}
+
+ public static String toSimpleErrorMessage(Exception e) {
+List lines = e.getMessage().lines().toList();
+return lines.size() > 1 ? lines.get(0) + lines.get(1) : lines.get(0);
Review Comment:
Yes, the client doesn't need to see the stack trace in the error message.
##
trino-connector/integration-test/src/test/java/org/apache/gravitino/trino/connector/integration/test/TrinoQueryRunner.java:
##
@@ -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
Review Comment:
fix
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Re: [PR] [#5533] fix (trino-connector): Fix the exception of ArrayIndexOutOfBoundsException when execute COMMENT COLUMN command [gravitino]
yuqi1129 commented on code in PR #6182:
URL: https://github.com/apache/gravitino/pull/6182#discussion_r1910423380
##
trino-connector/integration-test/src/test/java/org/apache/gravitino/trino/connector/integration/test/TrinoQueryRunner.java:
##
@@ -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
Review Comment:
avoid -> Avoid
ide -> IDE
##
trino-connector/trino-connector/src/main/java/org/apache/gravitino/trino/connector/GravitinoErrorCode.java:
##
@@ -64,4 +65,9 @@ public enum GravitinoErrorCode implements ErrorCodeSupplier {
public ErrorCode toErrorCode() {
return errorCode;
}
+
+ public static String toSimpleErrorMessage(Exception e) {
+List lines = e.getMessage().lines().toList();
+return lines.size() > 1 ? lines.get(0) + lines.get(1) : lines.get(0);
Review Comment:
Would we only output the first two lines of the error message?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
