gparai commented on a change in pull request #1425: DRILL-6647: Update Calcite 
version to 1.17.0
URL: https://github.com/apache/drill/pull/1425#discussion_r212097230
 
 

 ##########
 File path: 
exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillStatementImpl.java
 ##########
 @@ -65,107 +65,52 @@ private void throwIfClosed() throws 
AlreadyClosedSqlException {
   // called ResultSet.)
 
   @Override
-  public DrillConnectionImpl getConnection() {
-    // Can't throw any SQLException because AvaticaConnection's 
getConnection() is
-    // missing "throws SQLException".
-    try {
-      throwIfClosed();
-    } catch (AlreadyClosedSqlException e) {
-      throw new RuntimeException(e.getMessage(), e);
-    }
+  public DrillConnectionImpl getConnection() throws SQLException {
+    checkOpen();
     return connection;
   }
 
-  // WORKAROUND:  Work around AvaticaStatement's code that wraps _any_ 
exception,
-  // even if SQLException, by unwrapping to get cause exception so caller can
-  // throw it directly if it's a SQLException:
-  // TODO:  Any ideas for a better name?
-  private SQLException unwrapIfExtra( final SQLException superMethodException 
) {
 
 Review comment:
   Again could you please explain why we removed all these methods?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to