sohami commented on a change in pull request #1561: DRILL-6751: Upgrade Apache 
parent POM to version 21
URL: https://github.com/apache/drill/pull/1561#discussion_r239199696
 
 

 ##########
 File path: 
exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/WrappedAccessor.java
 ##########
 @@ -327,6 +328,19 @@ public Array getArray() throws SQLException {
     }
   }
 
+  @Override
+  public Struct getStruct() throws SQLException {
+    try {
+      return delegate.getStruct();
+    } catch (RuntimeException e) {
+      String message = e.getMessage();
+      if (message != null && message.startsWith("cannot convert to")) {
+        throw new SQLException(e.getMessage(), e);
+      }
+      throw e;
 
 Review comment:
   Looks like the error handling can be refactored to a separate method and 
used everywhere.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to