You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "yuqi1129 (via GitHub)" <gi...@apache.org> on 2025/01/10 14:08:13 UTC

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<String> 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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org