You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by pa...@apache.org on 2015/04/07 04:14:55 UTC

[1/9] drill git commit: DRILL-2651: Increase JDBC tests' timeout time.

Repository: drill
Updated Branches:
  refs/heads/master af7a52bee -> f066786e4


DRILL-2651: Increase JDBC tests' timeout time.

Added overriding timeout rule for test that have been timing out increasingly:
- TestJdbcMetadata
- Drill2128GetColumnsDataTypeNotTypeCodeIntBugsTest


Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/efdad4cb
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/efdad4cb
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/efdad4cb

Branch: refs/heads/master
Commit: efdad4cba09c51a60d75b0005ae2b7e83d84b98b
Parents: 31c9867
Author: dbarclay <db...@maprtech.com>
Authored: Wed Apr 1 01:06:17 2015 -0700
Committer: Parth Chandra <pc...@maprtech.com>
Committed: Mon Apr 6 18:24:05 2015 -0700

----------------------------------------------------------------------
 .../Drill2128GetColumnsDataTypeNotTypeCodeIntBugsTest.java   | 6 ++++++
 .../java/org/apache/drill/jdbc/test/TestJdbcMetadata.java    | 8 +++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/efdad4cb/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/Drill2128GetColumnsDataTypeNotTypeCodeIntBugsTest.java
----------------------------------------------------------------------
diff --git a/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/Drill2128GetColumnsDataTypeNotTypeCodeIntBugsTest.java b/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/Drill2128GetColumnsDataTypeNotTypeCodeIntBugsTest.java
index faca543..3dd3421 100644
--- a/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/Drill2128GetColumnsDataTypeNotTypeCodeIntBugsTest.java
+++ b/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/Drill2128GetColumnsDataTypeNotTypeCodeIntBugsTest.java
@@ -23,7 +23,9 @@ import static org.hamcrest.CoreMatchers.*;
 
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.TestRule;
 
 import java.sql.Connection;
 import java.sql.DatabaseMetaData;
@@ -31,6 +33,7 @@ import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Types;
 
+import org.apache.drill.common.util.TestTools;
 import org.apache.drill.jdbc.JdbcTest;
 
 
@@ -43,6 +46,9 @@ public class Drill2128GetColumnsDataTypeNotTypeCodeIntBugsTest extends JdbcTest
   private static Connection connection;
   private static DatabaseMetaData dbMetadata;
 
+  @Rule
+  public TestRule TIMEOUT = TestTools.getTimeoutRule( 90_000 /* ms */ );
+
   @BeforeClass
   public static void setUpConnection() throws Exception {
     connection = connect( "jdbc:drill:zk=local" );

http://git-wip-us.apache.org/repos/asf/drill/blob/efdad4cb/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/TestJdbcMetadata.java
----------------------------------------------------------------------
diff --git a/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/TestJdbcMetadata.java b/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/TestJdbcMetadata.java
index 24372a7..8c6604a 100644
--- a/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/TestJdbcMetadata.java
+++ b/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/TestJdbcMetadata.java
@@ -21,13 +21,19 @@ import java.sql.Connection;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 
+import org.apache.drill.common.util.TestTools;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.TestRule;
 
 
 public class TestJdbcMetadata extends JdbcTestActionBase {
-  static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TestJdbcMetadata.class);
+  private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TestJdbcMetadata.class);
 
 
+  @Rule
+  public TestRule TIMEOUT = TestTools.getTimeoutRule( 90_000 /* ms */ );
+
   @Test
   public void catalogs() throws Exception{
     this.testAction(new JdbcAction(){


[5/9] drill git commit: DRILL-2565: Add some key "already-closed" checks, with test for future DRILL-2489 work.

Posted by pa...@apache.org.
DRILL-2565: Add some key "already-closed" checks, with test for future DRILL-2489 work.

- Created AlreadyClosedSqlException.
- (Moved JdbcApiSqlException to be subclass of SQLNonTransientException.)
- Created test Drill2489CallsAfterCloseThrowExceptionsTest for eventual fixing
  of DRILL-2489.
  - (Is partial:  Covers Connection, Statement, and ResultSet.)
  - (Is interim:  Most methods' tests disabled with @Ignore("...DRILL-2489...").)
- Added already-closed checking in key places, especially those that involve
  communication and could hang for a while rather than dying quickly (e.g.,
  Statement.execute...(...)).


Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/f066786e
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/f066786e
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/f066786e

Branch: refs/heads/master
Commit: f066786e45b1c3ce93fafd339f0ad9c7bf4904bc
Parents: b2e9cd0
Author: dbarclay <db...@maprtech.com>
Authored: Tue Mar 24 22:58:33 2015 -0700
Committer: Parth Chandra <pc...@maprtech.com>
Committed: Mon Apr 6 18:24:06 2015 -0700

----------------------------------------------------------------------
 .../drill/jdbc/AlreadyClosedSqlException.java   |   95 +
 .../apache/drill/jdbc/DrillConnectionImpl.java  |   13 +
 .../drill/jdbc/DrillDatabaseMetaData.java       |   67 +-
 .../org/apache/drill/jdbc/DrillResultSet.java   |   21 +
 .../org/apache/drill/jdbc/DrillStatement.java   |   46 +
 .../jdbc/InvalidCursorStateSqlException.java    |    3 +-
 .../apache/drill/jdbc/JdbcApiSqlException.java  |   11 +-
 ...l2489CallsAfterCloseThrowExceptionsTest.java | 1862 ++++++++++++++++++
 8 files changed, 2108 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/f066786e/exec/jdbc/src/main/java/org/apache/drill/jdbc/AlreadyClosedSqlException.java
----------------------------------------------------------------------
diff --git a/exec/jdbc/src/main/java/org/apache/drill/jdbc/AlreadyClosedSqlException.java b/exec/jdbc/src/main/java/org/apache/drill/jdbc/AlreadyClosedSqlException.java
new file mode 100644
index 0000000..6e41bb4
--- /dev/null
+++ b/exec/jdbc/src/main/java/org/apache/drill/jdbc/AlreadyClosedSqlException.java
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.drill.jdbc;
+
+import java.sql.ResultSet;
+
+
+/**
+ * SQLException for object-already-closed conditions, e.g., calling a method
+ * on a closed {@link Statement}.
+ */
+public class AlreadyClosedSqlException extends JdbcApiSqlException {
+
+  private static final long serialVersionUID = 2015_03_25L;
+
+  /**
+   * See {@link JdbcApiSqlException#JdbcApiSqlException(String, String, int)}.
+   * /
+  public AlreadyClosedSqlException( String reason,
+                                    String SQLState,
+                                    int vendorCode ) {
+    super( reason, SQLState, vendorCode );
+  }
+
+  /**
+   * See {@link JdbcApiSqlException#JdbcApiSqlException(String, String)}.
+   * /
+  public AlreadyClosedSqlException( String reason, String SQLState ) {
+    super( reason, SQLState );
+  }
+
+  /**
+   * See {@link JdbcApiSqlException#JdbcApiSqlException(String)}.
+   */
+  public AlreadyClosedSqlException( String reason ) {
+    super( reason );
+  }
+
+  /**
+   * See {@link JdbcApiSqlException#JdbcApiSqlException()}.
+   */
+  public AlreadyClosedSqlException() {
+    super();
+  }
+
+  /**
+   * See {@link JdbcApiSqlException#JdbcApiSqlException(Throwable cause)}.
+   */
+  public AlreadyClosedSqlException( Throwable cause ) {
+    super( cause );
+  }
+
+  /**
+   * See {@link JdbcApiSqlException#JdbcApiSqlException(String, Throwable)}.
+   */
+  public AlreadyClosedSqlException( String reason, Throwable cause ) {
+    super( reason, cause );
+  }
+
+  /**
+   * See
+   * {@link JdbcApiSqlException#JdbcApiSqlException(String, String, Throwable)}.
+   */
+  public AlreadyClosedSqlException( String reason, String sqlState,
+                                         Throwable cause ) {
+    super( reason, sqlState, cause );
+  }
+
+  /**
+   * See
+   * {@link JdbcApiSqlException#JdbcApiSqlException(String, String, int, Throwable)}.
+   */
+  public AlreadyClosedSqlException( String reason,
+                                    String sqlState,
+                                    int vendorCode,
+                                    Throwable cause ) {
+    super( reason, sqlState, vendorCode, cause );
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/drill/blob/f066786e/exec/jdbc/src/main/java/org/apache/drill/jdbc/DrillConnectionImpl.java
----------------------------------------------------------------------
diff --git a/exec/jdbc/src/main/java/org/apache/drill/jdbc/DrillConnectionImpl.java b/exec/jdbc/src/main/java/org/apache/drill/jdbc/DrillConnectionImpl.java
index 8caeb3f..170495e 100644
--- a/exec/jdbc/src/main/java/org/apache/drill/jdbc/DrillConnectionImpl.java
+++ b/exec/jdbc/src/main/java/org/apache/drill/jdbc/DrillConnectionImpl.java
@@ -55,6 +55,17 @@ abstract class DrillConnectionImpl extends AvaticaConnection implements DrillCon
   private Drillbit bit;
   private RemoteServiceSet serviceSet;
 
+  /**
+   * Throws AlreadyClosedSqlException if this Connection is closed.
+   *
+   * @throws AlreadyClosedSqlException if Connection is closed
+   * @throws SQLException if error in calling {@link #isClosed()}
+   */
+  private void checkNotClosed() throws SQLException {
+    if ( isClosed() ) {
+      throw new AlreadyClosedSqlException( "Connection is already closed." );
+    }
+  }
 
   protected DrillConnectionImpl(Driver driver, AvaticaFactory factory, String url, Properties info) throws SQLException {
     super(driver, factory, url, info);
@@ -128,6 +139,7 @@ abstract class DrillConnectionImpl extends AvaticaConnection implements DrillCon
   @Override
   public DrillStatement createStatement(int resultSetType, int resultSetConcurrency,
                                         int resultSetHoldability) throws SQLException {
+    checkNotClosed();
     DrillStatement statement =
         (DrillStatement) super.createStatement(resultSetType, resultSetConcurrency,
                                                resultSetHoldability);
@@ -138,6 +150,7 @@ abstract class DrillConnectionImpl extends AvaticaConnection implements DrillCon
   public PreparedStatement prepareStatement(String sql, int resultSetType,
                                             int resultSetConcurrency,
                                             int resultSetHoldability) throws SQLException {
+    checkNotClosed();
     try {
       DrillPrepareResult prepareResult = new DrillPrepareResult(sql);
       DrillPreparedStatement statement =

http://git-wip-us.apache.org/repos/asf/drill/blob/f066786e/exec/jdbc/src/main/java/org/apache/drill/jdbc/DrillDatabaseMetaData.java
----------------------------------------------------------------------
diff --git a/exec/jdbc/src/main/java/org/apache/drill/jdbc/DrillDatabaseMetaData.java b/exec/jdbc/src/main/java/org/apache/drill/jdbc/DrillDatabaseMetaData.java
index ca1648d..4b2d694 100644
--- a/exec/jdbc/src/main/java/org/apache/drill/jdbc/DrillDatabaseMetaData.java
+++ b/exec/jdbc/src/main/java/org/apache/drill/jdbc/DrillDatabaseMetaData.java
@@ -17,6 +17,9 @@
  */
 package org.apache.drill.jdbc;
 
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
 import net.hydromatic.avatica.AvaticaConnection;
 import net.hydromatic.avatica.AvaticaDatabaseMetaData;
 
@@ -26,28 +29,84 @@ public class DrillDatabaseMetaData extends AvaticaDatabaseMetaData {
     super( connection );
   }
 
+  /**
+   * Throws AlreadyClosedSqlException if the associated Connection is closed.
+   *
+   * @throws AlreadyClosedSqlException if Connection is closed
+   * @throws SQLException if error in calling {@link Connection#isClosed()}
+   */
+  private void checkNotClosed() throws AlreadyClosedSqlException,
+                                       SQLException {
+    if ( getConnection().isClosed() ) {
+      throw new AlreadyClosedSqlException(
+          "DatabaseMetaData's Connection is already closed." );
+    }
+  }
+
 
   // For omitted NULLS FIRST/NULLS HIGH, Drill sort NULL sorts as highest value:
 
   @Override
-  public boolean nullsAreSortedHigh() {
+  public boolean nullsAreSortedHigh() throws SQLException {
+    checkNotClosed();
     return true;
   }
 
   @Override
-  public boolean nullsAreSortedLow() {
+  public boolean nullsAreSortedLow() throws SQLException {
+    checkNotClosed();
     return false;
   }
 
   @Override
-  public boolean nullsAreSortedAtStart() {
+  public boolean nullsAreSortedAtStart() throws SQLException {
+    checkNotClosed();
     return false;
   }
 
   @Override
-  public boolean nullsAreSortedAtEnd() {
+  public boolean nullsAreSortedAtEnd() throws SQLException {
+    checkNotClosed();
     return false;
   }
 
 
+  // For now, check whether connection is closed for most important methods
+  // (DRILL-2565 (partial fix for DRILL-2489)):
+
+
+  @Override
+  public ResultSet getCatalogs() throws SQLException {
+    checkNotClosed();
+    return super.getCatalogs();
+  }
+
+  @Override
+  public ResultSet getSchemas() throws SQLException {
+    checkNotClosed();
+    return super.getSchemas();
+  }
+
+  @Override
+  public ResultSet getSchemas( String catalog, String schemaPattern ) throws SQLException {
+    checkNotClosed();
+    return super.getSchemas( catalog, schemaPattern );
+  }
+
+  @Override
+  public ResultSet getTables( String catalog,
+                              String schemaPattern,
+                              String tableNamePattern,
+                              String[] types ) throws SQLException {
+    checkNotClosed();
+    return super.getTables( catalog, schemaPattern,tableNamePattern, types );
+  }
+
+  @Override
+  public ResultSet getColumns( String catalog, String schema, String table,
+                               String columnNamePattern ) throws SQLException {
+    checkNotClosed();
+    return super.getColumns( catalog, schema, table, columnNamePattern );
+  }
+
 }

http://git-wip-us.apache.org/repos/asf/drill/blob/f066786e/exec/jdbc/src/main/java/org/apache/drill/jdbc/DrillResultSet.java
----------------------------------------------------------------------
diff --git a/exec/jdbc/src/main/java/org/apache/drill/jdbc/DrillResultSet.java b/exec/jdbc/src/main/java/org/apache/drill/jdbc/DrillResultSet.java
index fb27d2d..74900bc 100644
--- a/exec/jdbc/src/main/java/org/apache/drill/jdbc/DrillResultSet.java
+++ b/exec/jdbc/src/main/java/org/apache/drill/jdbc/DrillResultSet.java
@@ -62,6 +62,25 @@ public class DrillResultSet extends AvaticaResultSet {
     cursor = new DrillCursor(this);
   }
 
+  /**
+   * Throws AlreadyClosedSqlException if this ResultSet is closed.
+   *
+   * @throws AlreadyClosedSqlException if ResultSe  is closed
+   * @throws SQLException if error in calling {@link #isClosed()}
+   */
+  private void checkNotClosed() throws SQLException {
+    if ( isClosed() ) {
+      throw new AlreadyClosedSqlException( "ResultSet is already closed." );
+    }
+  }
+
+  @Override
+  public ResultSetMetaData getMetaData() throws SQLException {
+    checkNotClosed();
+    return super.getMetaData();
+  }
+
+
   @Override
   protected void cancel() {
     cleanup();
@@ -78,6 +97,7 @@ public class DrillResultSet extends AvaticaResultSet {
 
   @Override
   public boolean next() throws SQLException {
+    checkNotClosed();
     // Next may be called after close has been called (for example after a user cancel) which in turn
     // sets the cursor to null. So we must check before we call next.
     // TODO: handle next() after close is called in the Avatica code.
@@ -90,6 +110,7 @@ public class DrillResultSet extends AvaticaResultSet {
 
   @Override
   protected DrillResultSet execute() throws SQLException{
+    checkNotClosed();
     // Call driver's callback. It is permitted to throw a RuntimeException.
     DrillConnectionImpl connection = (DrillConnectionImpl) statement.getConnection();
 

http://git-wip-us.apache.org/repos/asf/drill/blob/f066786e/exec/jdbc/src/main/java/org/apache/drill/jdbc/DrillStatement.java
----------------------------------------------------------------------
diff --git a/exec/jdbc/src/main/java/org/apache/drill/jdbc/DrillStatement.java b/exec/jdbc/src/main/java/org/apache/drill/jdbc/DrillStatement.java
index d934c7c..ba265e6 100644
--- a/exec/jdbc/src/main/java/org/apache/drill/jdbc/DrillStatement.java
+++ b/exec/jdbc/src/main/java/org/apache/drill/jdbc/DrillStatement.java
@@ -17,6 +17,9 @@
  */
 package org.apache.drill.jdbc;
 
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
 import net.hydromatic.avatica.AvaticaStatement;
 
 public abstract class DrillStatement extends AvaticaStatement
@@ -27,11 +30,54 @@ public abstract class DrillStatement extends AvaticaStatement
     connection.openStatementsRegistry.addStatement(this);
   }
 
+  /**
+   * Throws AlreadyClosedSqlException if this Statement is closed.
+   *
+   * @throws AlreadyClosedSqlException if Statement is closed
+   * @throws SQLException if error in calling {@link #isClosed()}
+   */
+  private void checkNotClosed() throws SQLException {
+    if ( isClosed() ) {
+      throw new AlreadyClosedSqlException( "Statement is already closed." );
+    }
+  }
+
   @Override
   public DrillConnectionImpl getConnection() {
     return (DrillConnectionImpl) connection;
   }
 
+
+  @Override
+  public boolean execute( String sql ) throws SQLException {
+    checkNotClosed();
+    return super.execute( sql );
+  }
+
+  @Override
+  public ResultSet  executeQuery( String sql ) throws SQLException {
+    checkNotClosed();
+    return super.executeQuery( sql );
+  }
+
+  @Override
+  public int executeUpdate( String sql ) throws SQLException {
+    checkNotClosed();
+    return super.executeUpdate( sql );
+  }
+
+  @Override
+  public int executeUpdate( String sql, int[] columnIndexes ) throws SQLException {
+    checkNotClosed();
+    return super.executeUpdate( sql, columnIndexes );
+  }
+
+  @Override
+  public int executeUpdate( String sql, String[] columnNames ) throws SQLException {
+    checkNotClosed();
+    return super.executeUpdate( sql, columnNames );
+  }
+
   @Override
   public void cleanup() {
     final DrillConnectionImpl connection1 = (DrillConnectionImpl) connection;

http://git-wip-us.apache.org/repos/asf/drill/blob/f066786e/exec/jdbc/src/main/java/org/apache/drill/jdbc/InvalidCursorStateSqlException.java
----------------------------------------------------------------------
diff --git a/exec/jdbc/src/main/java/org/apache/drill/jdbc/InvalidCursorStateSqlException.java b/exec/jdbc/src/main/java/org/apache/drill/jdbc/InvalidCursorStateSqlException.java
index 7b04371..8d882e9 100644
--- a/exec/jdbc/src/main/java/org/apache/drill/jdbc/InvalidCursorStateSqlException.java
+++ b/exec/jdbc/src/main/java/org/apache/drill/jdbc/InvalidCursorStateSqlException.java
@@ -23,7 +23,6 @@ import java.sql.ResultSet;
  * SQLException for invalid-cursor-state conditions, e.g., calling a column
  * accessor method before calling {@link ResultSet#next()} or after
  * {@link ResultSet#next()} returns false.
- *
  */
 class InvalidCursorStateSqlException extends JdbcApiSqlException {
 
@@ -55,7 +54,7 @@ class InvalidCursorStateSqlException extends JdbcApiSqlException {
 
   /**
    * See {@link JdbcApiSqlException#JdbcApiSqlException()}.
-   * */
+   */
   public InvalidCursorStateSqlException() {
     super();
   }

http://git-wip-us.apache.org/repos/asf/drill/blob/f066786e/exec/jdbc/src/main/java/org/apache/drill/jdbc/JdbcApiSqlException.java
----------------------------------------------------------------------
diff --git a/exec/jdbc/src/main/java/org/apache/drill/jdbc/JdbcApiSqlException.java b/exec/jdbc/src/main/java/org/apache/drill/jdbc/JdbcApiSqlException.java
index d6b05fb..a7e6d98 100644
--- a/exec/jdbc/src/main/java/org/apache/drill/jdbc/JdbcApiSqlException.java
+++ b/exec/jdbc/src/main/java/org/apache/drill/jdbc/JdbcApiSqlException.java
@@ -18,9 +18,10 @@
 package org.apache.drill.jdbc;
 
 import java.sql.SQLException;
+import java.sql.SQLNonTransientException;
 
 /**
- * SQLException for JDBC API calling sequence/state problems.
+ * SQLException for JDBC API calling-sequence/state problems.
  *
  * <p>
  *   {@code JdbcApiSqlException} is intended for errors in using the JDBC API,
@@ -30,8 +31,10 @@ import java.sql.SQLException;
  * <p>
  *   ({@code JdbcApiSqlException} is not for errors that are not under direct
  *   control of the programmer writing JDBC API calls, for example, invalid SQL
- *   syntax, errors from SQL-vs.-data mismatches, data file format errors,
- *   resource availability errors, or internal Drill errors.)
+ *   syntax errors (which should use {@link SQLSyntaxErrorException}), errors
+ *   from SQL-vs.-data mismatches (which likely should use {@link SQLDataException}),
+ *   data file format errors, resource availability errors (which might use
+ *   {@link SQLTransientException}), or internal Drill errors.)
  * </p>
  * <p>
  *  TODO:  Consider having a DrillSqlException (in part for reviewing,
@@ -88,7 +91,7 @@ import java.sql.SQLException;
  *   etc.)
  * </p>
  */
-class JdbcApiSqlException extends SQLException {
+class JdbcApiSqlException extends SQLNonTransientException {
 
   private static final long serialVersionUID = 2014_12_12L;
 


[8/9] drill git commit: DRILL-2632: Added assertion check to DRILL-2463 test.

Posted by pa...@apache.org.
DRILL-2632: Added assertion check to DRILL-2463 test.

In Drill2463GetNullsFailedWithAssertionsBugTest, added check that Java
assertions are enabled, since test depends on their being enabled.


Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/45d17549
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/45d17549
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/45d17549

Branch: refs/heads/master
Commit: 45d17549246aff453b4e21ffe62f3e42c8c72a35
Parents: efdad4c
Author: dbarclay <db...@maprtech.com>
Authored: Mon Mar 30 17:51:44 2015 -0700
Committer: Parth Chandra <pc...@maprtech.com>
Committed: Mon Apr 6 18:24:06 2015 -0700

----------------------------------------------------------------------
 .../test/Drill2463GetNullsFailedWithAssertionsBugTest.java   | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/45d17549/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/Drill2463GetNullsFailedWithAssertionsBugTest.java
----------------------------------------------------------------------
diff --git a/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/Drill2463GetNullsFailedWithAssertionsBugTest.java b/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/Drill2463GetNullsFailedWithAssertionsBugTest.java
index c8346b1..536a020 100644
--- a/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/Drill2463GetNullsFailedWithAssertionsBugTest.java
+++ b/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/Drill2463GetNullsFailedWithAssertionsBugTest.java
@@ -43,6 +43,12 @@ public class Drill2463GetNullsFailedWithAssertionsBugTest extends JdbcTest {
   public static void setUpConnection() throws SQLException {
     connection = new Driver().connect( "jdbc:drill:zk=local", null );
     statement = connection.createStatement();
+
+    boolean assertionsEnabled = false;
+    assert assertionsEnabled = true;
+    if ( ! assertionsEnabled ) {
+      throw new RuntimeException( "Assertions need to be enabled but are not." );
+    }
   }
 
   @AfterClass
@@ -73,7 +79,7 @@ public class Drill2463GetNullsFailedWithAssertionsBugTest extends JdbcTest {
   @Test
   public void testGetNonprimitiveTypeNullAsOwnType() throws Exception {
     ResultSet rs = statement.executeQuery(
-        "SELECT CAST( NULL AS VARCHAR) FROM INFORMATION_SCHEMA.CATALOGS" );
+        "SELECT CAST( NULL AS VARCHAR ) FROM INFORMATION_SCHEMA.CATALOGS" );
     assert rs.next();
     assertThat( "getString(...) for NULL", rs.getString( 1 ), nullValue() );
     assertThat( "wasNull", rs.wasNull(), equalTo( true ) );


[9/9] drill git commit: DRILL-2684: fix clashing view names

Posted by pa...@apache.org.
DRILL-2684: fix clashing view names


Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/b2e9cd0e
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/b2e9cd0e
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/b2e9cd0e

Branch: refs/heads/master
Commit: b2e9cd0e7d14231bb239c4c4cc99b2abc01d5e4e
Parents: e4e88cc
Author: Hanifi Gunes <hg...@maprtech.com>
Authored: Fri Apr 3 19:49:41 2015 -0700
Committer: Parth Chandra <pc...@maprtech.com>
Committed: Mon Apr 6 18:24:06 2015 -0700

----------------------------------------------------------------------
 .../java/org/apache/drill/TestExampleQueries.java   | 16 ++++++++--------
 .../test/java/org/apache/drill/TestUnionAll.java    | 12 ++++++------
 2 files changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/b2e9cd0e/exec/java-exec/src/test/java/org/apache/drill/TestExampleQueries.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/TestExampleQueries.java b/exec/java-exec/src/test/java/org/apache/drill/TestExampleQueries.java
index 862de5e..921dacc 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/TestExampleQueries.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/TestExampleQueries.java
@@ -390,24 +390,24 @@ public class TestExampleQueries extends BaseTestQuery{
   public void testDRILL_811ViewJoin() throws Exception {
     test("use dfs.tmp");
     test("create view nation_view_testexamplequeries as select * from cp.`tpch/nation.parquet`;");
-    test("create view region_view as select * from cp.`tpch/region.parquet`;");
+    test("create view region_view_testexamplequeries as select * from cp.`tpch/region.parquet`;");
 
-    test("select n.n_nationkey, n.n_regionkey, r.r_name from region_view r , nation_view_testexamplequeries n where r.r_regionkey = n.n_regionkey ");
+    test("select n.n_nationkey, n.n_regionkey, r.r_name from region_view_testexamplequeries r , nation_view_testexamplequeries n where r.r_regionkey = n.n_regionkey ");
 
-    test("select n.n_regionkey, count(*) as cnt from region_view r , nation_view_testexamplequeries n where r.r_regionkey = n.n_regionkey and n.n_nationkey > 8 group by n.n_regionkey order by n.n_regionkey");
+    test("select n.n_regionkey, count(*) as cnt from region_view_testexamplequeries r , nation_view_testexamplequeries n where r.r_regionkey = n.n_regionkey and n.n_nationkey > 8 group by n.n_regionkey order by n.n_regionkey");
 
-    test("select n.n_regionkey, count(*) as cnt from region_view r join nation_view_testexamplequeries n on r.r_regionkey = n.n_regionkey and n.n_nationkey > 8 group by n.n_regionkey order by n.n_regionkey");
+    test("select n.n_regionkey, count(*) as cnt from region_view_testexamplequeries r join nation_view_testexamplequeries n on r.r_regionkey = n.n_regionkey and n.n_nationkey > 8 group by n.n_regionkey order by n.n_regionkey");
 
-    test("drop view region_view ");
+    test("drop view region_view_testexamplequeries ");
     test("drop view nation_view_testexamplequeries ");
   }
 
   @Test  // DRILL-811
   public void testDRILL_811Json() throws Exception {
     test("use dfs.tmp");
-    test("create view region_view as select * from cp.`region.json`;");
-    test("select sales_city, sales_region from region_view where region_id > 50 order by sales_country; ");
-    test("drop view region_view ");
+    test("create view region_view_testexamplequeries as select * from cp.`region.json`;");
+    test("select sales_city, sales_region from region_view_testexamplequeries where region_id > 50 order by sales_country; ");
+    test("drop view region_view_testexamplequeries ");
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/drill/blob/b2e9cd0e/exec/java-exec/src/test/java/org/apache/drill/TestUnionAll.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/TestUnionAll.java b/exec/java-exec/src/test/java/org/apache/drill/TestUnionAll.java
index fee1d6a..7033013 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/TestUnionAll.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/TestUnionAll.java
@@ -186,11 +186,11 @@ public class TestUnionAll extends BaseTestQuery{
   public void testUnionAllViewExpandableStar() throws Exception {
     test("use dfs.tmp");
     test("create view nation_view_testunionall as select n_name, n_nationkey from cp.`tpch/nation.parquet`;");
-    test("create view region_view as select r_name, r_regionkey from cp.`tpch/region.parquet`;");
+    test("create view region_view_testunionall as select r_name, r_regionkey from cp.`tpch/region.parquet`;");
 
     String query1 = "(select * from dfs.tmp.`nation_view_testunionall`) " +
                     "union all " +
-                    "(select * from dfs.tmp.`region_view`) ";
+                    "(select * from dfs.tmp.`region_view_testunionall`) ";
 
     String query2 =  "(select r_name, r_regionkey from cp.`tpch/region.parquet`) " +
                      "union all " +
@@ -214,7 +214,7 @@ public class TestUnionAll extends BaseTestQuery{
           .build().run();
     } finally {
       test("drop view nation_view_testunionall");
-      test("drop view region_view");
+      test("drop view region_view_testunionall");
     }
   }
 
@@ -239,12 +239,12 @@ public class TestUnionAll extends BaseTestQuery{
   public void testDiffDataTypesAndModes() throws Exception {
     test("use dfs.tmp");
     test("create view nation_view_testunionall as select n_name, n_nationkey from cp.`tpch/nation.parquet`;");
-    test("create view region_view as select r_name, r_regionkey from cp.`tpch/region.parquet`;");
+    test("create view region_view_testunionall as select r_name, r_regionkey from cp.`tpch/region.parquet`;");
 
     String t1 = "(select n_comment, n_regionkey from cp.`tpch/nation.parquet` limit 5)";
     String t2 = "(select * from nation_view_testunionall  limit 5)";
     String t3 = "(select full_name, store_id from cp.`employee.json` limit 5)";
-    String t4 = "(select * from region_view  limit 5)";
+    String t4 = "(select * from region_view_testunionall  limit 5)";
 
     String query1 = t1 + " union all " + t2 + " union all " + t3 + " union all " + t4;
 
@@ -258,7 +258,7 @@ public class TestUnionAll extends BaseTestQuery{
           .build().run();
     } finally {
       test("drop view nation_view_testunionall");
-      test("drop view region_view");
+      test("drop view region_view_testunionall");
     }
   }
 


[7/9] drill git commit: DRILL-2638: Regularize startup/shutdown logging a bit in/near Drillbit.

Posted by pa...@apache.org.
DRILL-2638: Regularize startup/shutdown logging a bit in/near Drillbit.

In Drillbit:
- Added shutdown time (ms).
- Regularized to have bracketing "starting" and "finished" messages (when DEBUG
  enabled; include only messages with times at INFO level).  (See examples below.)
- Edited text.

In FunctionImplementationRegistry
- DEBUG -> INFO for message with startup time.
- Edited text.

(Examples:
At DEBUG level:

... DEBUG o.apache.drill.exec.server.Drillbit - Starting new Drillbit.
... DEBUG o.apache.drill.exec.server.Drillbit - Construction started.
... INFO  o.apache.drill.exec.server.Drillbit - Construction completed (1259 ms).
... DEBUG o.apache.drill.exec.server.Drillbit - Startup begun.
... INFO  o.apache.drill.exec.server.Drillbit - Startup completed (5359 ms).
... DEBUG o.apache.drill.exec.server.Drillbit - Started new Drillbit.
...
... DEBUG o.apache.drill.exec.server.Drillbit - Shutdown begun.
... INFO  o.apache.drill.exec.server.Drillbit - Shutdown completed (6346 ms).

At INFO level:

... INFO  o.apache.drill.exec.server.Drillbit - Construction completed (1259 ms).
... INFO  o.apache.drill.exec.server.Drillbit - Startup completed (5359 ms).
...
... INFO  o.apache.drill.exec.server.Drillbit - Shutdown completed (6346 ms).
)


Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/ab7034b2
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/ab7034b2
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/ab7034b2

Branch: refs/heads/master
Commit: ab7034b2ba0c8cbdaf33372249bf68491ffe0f39
Parents: 45d1754
Author: dbarclay <db...@maprtech.com>
Authored: Tue Mar 31 12:04:17 2015 -0700
Committer: Parth Chandra <pc...@maprtech.com>
Committed: Mon Apr 6 18:24:06 2015 -0700

----------------------------------------------------------------------
 .../expr/fn/FunctionImplementationRegistry.java    |  4 ++--
 .../org/apache/drill/exec/server/Drillbit.java     | 17 +++++++++++++----
 2 files changed, 15 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/ab7034b2/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/FunctionImplementationRegistry.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/FunctionImplementationRegistry.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/FunctionImplementationRegistry.java
index e96fa60..05d59ff 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/FunctionImplementationRegistry.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/FunctionImplementationRegistry.java
@@ -47,7 +47,7 @@ public class FunctionImplementationRegistry {
   public FunctionImplementationRegistry(DrillConfig config){
     Stopwatch w = new Stopwatch().start();
 
-    logger.debug("Generating Function Registry.");
+    logger.debug("Generating function registry.");
     drillFuncRegistry = new DrillFunctionRegistry(config);
 
     Set<Class<? extends PluggableFunctionRegistry>> registryClasses = PathScanner.scanForImplementations(
@@ -72,7 +72,7 @@ public class FunctionImplementationRegistry {
         break;
       }
     }
-    logger.debug("Function registry loaded.  {} functions loaded in {}ms.", drillFuncRegistry.size(), w.elapsed(TimeUnit.MILLISECONDS));
+    logger.info("Function registry loaded.  {} functions loaded in {} ms.", drillFuncRegistry.size(), w.elapsed(TimeUnit.MILLISECONDS));
   }
 
   public FunctionImplementationRegistry(DrillConfig config, OptionManager optionManager) {

http://git-wip-us.apache.org/repos/asf/drill/blob/ab7034b2/exec/java-exec/src/main/java/org/apache/drill/exec/server/Drillbit.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/server/Drillbit.java b/exec/java-exec/src/main/java/org/apache/drill/exec/server/Drillbit.java
index 958f2dc..c15bb7c 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/server/Drillbit.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/server/Drillbit.java
@@ -57,7 +57,7 @@ import com.google.common.io.Closeables;
 public class Drillbit implements AutoCloseable {
   private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(Drillbit.class);
   static {
-    Environment.logEnv("Drillbit environment:.", logger);
+    Environment.logEnv("Drillbit environment: ", logger);
   }
 
   private boolean isClosed = false;
@@ -72,7 +72,7 @@ public class Drillbit implements AutoCloseable {
 
   public static Drillbit start(final DrillConfig config, final RemoteServiceSet remoteServiceSet)
       throws DrillbitStartupException {
-    logger.debug("Setting up Drillbit.");
+    logger.debug("Starting new Drillbit.");
     Drillbit bit;
     try {
       bit = new Drillbit(config, remoteServiceSet);
@@ -80,13 +80,13 @@ public class Drillbit implements AutoCloseable {
       throw new DrillbitStartupException("Failure while initializing values in Drillbit.", ex);
     }
 
-    logger.debug("Starting Drillbit.");
     try {
       bit.run();
     } catch (Exception e) {
       bit.close();
       throw new DrillbitStartupException("Failure during initial startup of Drillbit.", e);
     }
+    logger.debug("Started new Drillbit.");
     return bit;
   }
 
@@ -175,6 +175,8 @@ public class Drillbit implements AutoCloseable {
   private RegistrationHandle registrationHandle;
 
   public Drillbit(DrillConfig config, RemoteServiceSet serviceSet) throws Exception {
+    final long startTime = System.currentTimeMillis();
+    logger.debug("Construction started.");
     final boolean allowPortHunting = serviceSet != null;
     final boolean enableHttp = config.getBoolean(ExecConstants.HTTP_ENABLE);
     context = new BootStrapContext(config);
@@ -195,6 +197,7 @@ public class Drillbit implements AutoCloseable {
       coord = new ZKClusterCoordinator(config);
       storeProvider = new PStoreRegistry(this.coord, config).newPStoreProvider();
     }
+    logger.info("Construction completed ({} ms).", System.currentTimeMillis() - startTime);
   }
 
   private void startJetty() throws Exception {
@@ -231,6 +234,8 @@ public class Drillbit implements AutoCloseable {
   }
 
   public void run() throws Exception {
+    final long startTime = System.currentTimeMillis();
+    logger.debug("Startup begun.");
     coord.start(10000);
     storeProvider.start();
     final DrillbitEndpoint md = engine.start();
@@ -243,6 +248,7 @@ public class Drillbit implements AutoCloseable {
     startJetty();
 
     Runtime.getRuntime().addShutdownHook(new ShutdownThread(this, new StackTrace()));
+    logger.info("Startup completed ({} ms).", System.currentTimeMillis() - startTime);
   }
 
   @Override
@@ -251,6 +257,8 @@ public class Drillbit implements AutoCloseable {
     if (isClosed) {
       return;
     }
+    final long startTime = System.currentTimeMillis();
+    logger.debug("Shutdown begun.");
 
     // wait for anything that is running to complete
     manager.waitToExit();
@@ -279,7 +287,7 @@ public class Drillbit implements AutoCloseable {
     AutoCloseables.close(manager, logger);
     Closeables.closeQuietly(context);
 
-    logger.info("Shutdown completed.");
+    logger.info("Shutdown completed ({} ms).", System.currentTimeMillis() - startTime);
     isClosed = true;
   }
 
@@ -324,4 +332,5 @@ public class Drillbit implements AutoCloseable {
   public DrillbitContext getContext() {
     return manager.getContext();
   }
+
 }


[6/9] drill git commit: DRILL-2671: C++ Client Authentication API passing std::string across DLL boundaries

Posted by pa...@apache.org.
DRILL-2671: C++ Client Authentication API passing std::string across DLL boundaries


Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/e4e88cca
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/e4e88cca
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/e4e88cca

Branch: refs/heads/master
Commit: e4e88cca931569011290a036fed6b1602ac80839
Parents: ab7034b
Author: Norris Lee <no...@simba.com>
Authored: Mon Apr 6 11:20:34 2015 -0700
Committer: Parth Chandra <pc...@maprtech.com>
Committed: Mon Apr 6 18:24:06 2015 -0700

----------------------------------------------------------------------
 contrib/native/client/src/include/drill/drillClient.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/e4e88cca/contrib/native/client/src/include/drill/drillClient.hpp
----------------------------------------------------------------------
diff --git a/contrib/native/client/src/include/drill/drillClient.hpp b/contrib/native/client/src/include/drill/drillClient.hpp
index c288c70..d7bf33c 100644
--- a/contrib/native/client/src/include/drill/drillClient.hpp
+++ b/contrib/native/client/src/include/drill/drillClient.hpp
@@ -141,7 +141,7 @@ class DECLSPEC_DRILL_CLIENT DrillUserProperties{
 
         DrillUserProperties(){};
 
-        void setProperty( std::string propName, std::string propValue){
+        void setProperty( const std::string& propName, const std::string& propValue){
             std::pair< std::string, std::string> in = make_pair(propName, propValue);
             m_properties.push_back(in);
         }


[2/9] drill git commit: DRILL-2579: 2-Hygiene: Renamed to match semantics; fixed, added, formatted doc.; basic whitespace.

Posted by pa...@apache.org.
DRILL-2579: 2-Hygiene: Renamed to match semantics; fixed, added, formatted doc.; basic whitespace.

- Renamed createConnection -> getConnection.
- Renamed close -> closeConnections
- Added documentation fixes, clarifications, formatting.
- Fixed some basic whitespace.


Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/31c9867a
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/31c9867a
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/31c9867a

Branch: refs/heads/master
Commit: 31c9867ae36dab9873c8d02f50a75ce66b9e68c7
Parents: 1821f78
Author: dbarclay <db...@maprtech.com>
Authored: Thu Mar 26 21:26:26 2015 -0700
Committer: Parth Chandra <pc...@maprtech.com>
Committed: Mon Apr 6 18:24:05 2015 -0700

----------------------------------------------------------------------
 .../drill/jdbc/CachingConnectionFactory.java      |  4 ++--
 .../org/apache/drill/jdbc/ConnectionFactory.java  | 12 +++++++-----
 .../test/java/org/apache/drill/jdbc/JdbcTest.java |  8 ++++----
 .../drill/jdbc/MultiConnectionCachingFactory.java |  8 ++++----
 .../apache/drill/jdbc/NonClosableConnection.java  |  4 ++--
 .../jdbc/SingleConnectionCachingFactory.java      | 18 ++++++++++++++----
 .../org/apache/drill/jdbc/test/JdbcAssert.java    |  2 +-
 7 files changed, 34 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/31c9867a/exec/jdbc/src/test/java/org/apache/drill/jdbc/CachingConnectionFactory.java
----------------------------------------------------------------------
diff --git a/exec/jdbc/src/test/java/org/apache/drill/jdbc/CachingConnectionFactory.java b/exec/jdbc/src/test/java/org/apache/drill/jdbc/CachingConnectionFactory.java
index df64366..65f993a 100644
--- a/exec/jdbc/src/test/java/org/apache/drill/jdbc/CachingConnectionFactory.java
+++ b/exec/jdbc/src/test/java/org/apache/drill/jdbc/CachingConnectionFactory.java
@@ -25,7 +25,7 @@ import java.sql.SQLException;
 public interface CachingConnectionFactory extends ConnectionFactory {
 
   /**
-   * Closes all active connections in the cache.
+   * Closes all open connections in this factory's cache.
    */
-  void close() throws SQLException;
+  void closeConnections() throws SQLException;
 }

http://git-wip-us.apache.org/repos/asf/drill/blob/31c9867a/exec/jdbc/src/test/java/org/apache/drill/jdbc/ConnectionFactory.java
----------------------------------------------------------------------
diff --git a/exec/jdbc/src/test/java/org/apache/drill/jdbc/ConnectionFactory.java b/exec/jdbc/src/test/java/org/apache/drill/jdbc/ConnectionFactory.java
index 8491436..09366de 100644
--- a/exec/jdbc/src/test/java/org/apache/drill/jdbc/ConnectionFactory.java
+++ b/exec/jdbc/src/test/java/org/apache/drill/jdbc/ConnectionFactory.java
@@ -20,14 +20,16 @@ package org.apache.drill.jdbc;
 import java.sql.Connection;
 
 /**
- * A factory used to create {@link java.sql.Connection} instances.
+ * A factory used to get open {@link Connection} instances.
  */
 public interface ConnectionFactory {
+
   /**
-   * Creates a new {@link java.sql.Connection} based on the given {@link org.apache.drill.jdbc.ConnectionInfo info}
+   * Gets an open {@link Connection} based on given {@link ConnectionInfo
+   * connection parameters}.
    *
-   * @param info connection parameters
-   * @throws Exception if factory fails to create a connection.
+   * @param info the connection parameters
+   * @throws Exception if factory fails to get a connection.
    */
-  Connection createConnection(ConnectionInfo info) throws Exception;
+  Connection getConnection(ConnectionInfo info) throws Exception;
 }

http://git-wip-us.apache.org/repos/asf/drill/blob/31c9867a/exec/jdbc/src/test/java/org/apache/drill/jdbc/JdbcTest.java
----------------------------------------------------------------------
diff --git a/exec/jdbc/src/test/java/org/apache/drill/jdbc/JdbcTest.java b/exec/jdbc/src/test/java/org/apache/drill/jdbc/JdbcTest.java
index 6d8d8e9..e486898 100644
--- a/exec/jdbc/src/test/java/org/apache/drill/jdbc/JdbcTest.java
+++ b/exec/jdbc/src/test/java/org/apache/drill/jdbc/JdbcTest.java
@@ -51,7 +51,7 @@ public class JdbcTest extends ExecTest {
   public static void setUpTestCase() {
     factory = new SingleConnectionCachingFactory(new ConnectionFactory() {
       @Override
-      public Connection createConnection(ConnectionInfo info) throws Exception {
+      public Connection getConnection(ConnectionInfo info) throws Exception {
         Class.forName("org.apache.drill.jdbc.Driver");
         return DriverManager.getConnection(info.getUrl(), info.getParamsAsProperties());
       }
@@ -76,7 +76,7 @@ public class JdbcTest extends ExecTest {
    * @throws Exception if connection fails
    */
   protected static Connection connect(String url, Properties info) throws Exception {
-    final Connection conn = factory.createConnection(new ConnectionInfo(url, info));
+    final Connection conn = factory.getConnection(new ConnectionInfo(url, info));
     changeSchemaIfSupplied(conn, info);
     return conn;
   }
@@ -120,7 +120,7 @@ public class JdbcTest extends ExecTest {
    */
   protected static void reset() {
     try {
-      factory.close();
+      factory.closeConnections();
     } catch (SQLException e) {
       throw new RuntimeException("error while closing connection factory", e);
     }
@@ -128,6 +128,6 @@ public class JdbcTest extends ExecTest {
 
   @AfterClass
   public static void tearDownTestCase() throws Exception {
-    factory.close();
+    factory.closeConnections();
   }
 }

http://git-wip-us.apache.org/repos/asf/drill/blob/31c9867a/exec/jdbc/src/test/java/org/apache/drill/jdbc/MultiConnectionCachingFactory.java
----------------------------------------------------------------------
diff --git a/exec/jdbc/src/test/java/org/apache/drill/jdbc/MultiConnectionCachingFactory.java b/exec/jdbc/src/test/java/org/apache/drill/jdbc/MultiConnectionCachingFactory.java
index 189942d..063b5a5 100644
--- a/exec/jdbc/src/test/java/org/apache/drill/jdbc/MultiConnectionCachingFactory.java
+++ b/exec/jdbc/src/test/java/org/apache/drill/jdbc/MultiConnectionCachingFactory.java
@@ -45,10 +45,10 @@ public class MultiConnectionCachingFactory implements CachingConnectionFactory {
    * {@link java.sql.Connection#close()}. Consumer must call {#close} to close the cached connections.
    */
   @Override
-  public Connection createConnection(ConnectionInfo info) throws Exception {
+  public Connection getConnection(ConnectionInfo info) throws Exception {
     Connection conn = cache.get(info);
     if (conn == null) {
-      conn = delegate.createConnection(info);
+      conn = delegate.getConnection(info);
       cache.put(info, conn);
     }
     return new NonClosableConnection(conn);
@@ -57,8 +57,8 @@ public class MultiConnectionCachingFactory implements CachingConnectionFactory {
   /**
    * Closes all active connections in the cache.
    */
-  public void close() throws SQLException {
-    for (Connection conn:cache.values()) {
+  public void closeConnections() throws SQLException {
+    for (Connection conn : cache.values()) {
       conn.close();
     }
   }

http://git-wip-us.apache.org/repos/asf/drill/blob/31c9867a/exec/jdbc/src/test/java/org/apache/drill/jdbc/NonClosableConnection.java
----------------------------------------------------------------------
diff --git a/exec/jdbc/src/test/java/org/apache/drill/jdbc/NonClosableConnection.java b/exec/jdbc/src/test/java/org/apache/drill/jdbc/NonClosableConnection.java
index 1e37700..d119ec8 100644
--- a/exec/jdbc/src/test/java/org/apache/drill/jdbc/NonClosableConnection.java
+++ b/exec/jdbc/src/test/java/org/apache/drill/jdbc/NonClosableConnection.java
@@ -39,9 +39,9 @@ import java.util.concurrent.Executor;
 import parquet.Preconditions;
 
 /**
- * A connection decorator that ignores {@link java.sql.Connection#close} calls.
+ * A connection decorator that ignores {@link Connection#close} calls.
  *
- * All other calls are delegated to inner {@link java.sql.Connection connection}.
+ * All other calls are delegated to inner {@link Connection connection}.
  */
 public final class NonClosableConnection implements Connection {
   private final Connection delegate;

http://git-wip-us.apache.org/repos/asf/drill/blob/31c9867a/exec/jdbc/src/test/java/org/apache/drill/jdbc/SingleConnectionCachingFactory.java
----------------------------------------------------------------------
diff --git a/exec/jdbc/src/test/java/org/apache/drill/jdbc/SingleConnectionCachingFactory.java b/exec/jdbc/src/test/java/org/apache/drill/jdbc/SingleConnectionCachingFactory.java
index e5be105..7e3a51b 100644
--- a/exec/jdbc/src/test/java/org/apache/drill/jdbc/SingleConnectionCachingFactory.java
+++ b/exec/jdbc/src/test/java/org/apache/drill/jdbc/SingleConnectionCachingFactory.java
@@ -23,7 +23,9 @@ import java.sql.SQLException;
 /**
  * A connection factory that creates and caches a single connection instance.
  *
- * Not thread safe.
+ * <p>
+ *   Not thread safe.
+ * </p>
  */
 public class SingleConnectionCachingFactory implements CachingConnectionFactory {
 
@@ -34,10 +36,18 @@ public class SingleConnectionCachingFactory implements CachingConnectionFactory
     this.delegate = delegate;
   }
 
+  /**
+   * {@inheritDoc}
+   * <p>
+   *   For this implementation, calls to {@code createConnection} without any
+   *   intervening calls to {@link closeConnection} return the same Connection
+   *   instance.
+   * </p>
+   */
   @Override
-  public Connection createConnection(ConnectionInfo info) throws Exception {
+  public Connection getConnection(ConnectionInfo info) throws Exception {
     if (connection == null) {
-      connection = delegate.createConnection(info);
+      connection = delegate.getConnection(info);
     } else {
       JdbcTest.changeSchemaIfSupplied(connection, info.getParamsAsProperties());
     }
@@ -45,7 +55,7 @@ public class SingleConnectionCachingFactory implements CachingConnectionFactory
   }
 
   @Override
-  public void close() throws SQLException {
+  public void closeConnections() throws SQLException {
     if (connection != null) {
       connection.close();
       connection = null;

http://git-wip-us.apache.org/repos/asf/drill/blob/31c9867a/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/JdbcAssert.java
----------------------------------------------------------------------
diff --git a/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/JdbcAssert.java b/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/JdbcAssert.java
index f7ecf0a..84e05e6 100644
--- a/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/JdbcAssert.java
+++ b/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/JdbcAssert.java
@@ -160,7 +160,7 @@ public class JdbcAssert {
       this.info = info;
       this.adapter = new ConnectionFactoryAdapter() {
         public Connection createConnection() throws Exception {
-          return factory.createConnection(new ConnectionInfo("jdbc:drill:zk=local", ModelAndSchema.this.info));
+          return factory.getConnection(new ConnectionInfo("jdbc:drill:zk=local", ModelAndSchema.this.info));
         }
       };
     }


[3/9] drill git commit: DRILL-2579: 1-Core fix: Nulled out member to avoid re-using closed Connection. [SingleConnectionCachingFactory]

Posted by pa...@apache.org.
DRILL-2579: 1-Core fix: Nulled out member to avoid re-using closed Connection. [SingleConnectionCachingFactory]


Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/1821f783
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/1821f783
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/1821f783

Branch: refs/heads/master
Commit: 1821f78383ca7794722581f921eeb14452927fc8
Parents: af7a52b
Author: dbarclay <db...@maprtech.com>
Authored: Fri Mar 27 10:42:22 2015 -0700
Committer: Parth Chandra <pc...@maprtech.com>
Committed: Mon Apr 6 18:24:05 2015 -0700

----------------------------------------------------------------------
 .../java/org/apache/drill/jdbc/SingleConnectionCachingFactory.java  | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/1821f783/exec/jdbc/src/test/java/org/apache/drill/jdbc/SingleConnectionCachingFactory.java
----------------------------------------------------------------------
diff --git a/exec/jdbc/src/test/java/org/apache/drill/jdbc/SingleConnectionCachingFactory.java b/exec/jdbc/src/test/java/org/apache/drill/jdbc/SingleConnectionCachingFactory.java
index 88fb4c6..e5be105 100644
--- a/exec/jdbc/src/test/java/org/apache/drill/jdbc/SingleConnectionCachingFactory.java
+++ b/exec/jdbc/src/test/java/org/apache/drill/jdbc/SingleConnectionCachingFactory.java
@@ -48,6 +48,7 @@ public class SingleConnectionCachingFactory implements CachingConnectionFactory
   public void close() throws SQLException {
     if (connection != null) {
       connection.close();
+      connection = null;
     }
   }
 }


[4/9] drill git commit: DRILL-2565: Add some key "already-closed" checks, with test for future DRILL-2489 work.

Posted by pa...@apache.org.
http://git-wip-us.apache.org/repos/asf/drill/blob/f066786e/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/Drill2489CallsAfterCloseThrowExceptionsTest.java
----------------------------------------------------------------------
diff --git a/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/Drill2489CallsAfterCloseThrowExceptionsTest.java b/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/Drill2489CallsAfterCloseThrowExceptionsTest.java
new file mode 100644
index 0000000..9446d5f
--- /dev/null
+++ b/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/Drill2489CallsAfterCloseThrowExceptionsTest.java
@@ -0,0 +1,1862 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.drill.jdbc.test;
+
+import static org.junit.Assert.assertThat;
+import static org.hamcrest.CoreMatchers.*;
+
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+
+import java.io.InputStream;
+import java.io.Reader;
+import java.math.BigDecimal;
+import java.sql.Array;
+import java.sql.Blob;
+import java.sql.Clob;
+import java.sql.Connection;
+import java.sql.DatabaseMetaData;
+import java.sql.Date;
+import java.sql.NClob;
+import java.sql.Ref;
+import java.sql.ResultSet;
+import java.sql.RowId;
+import java.sql.SQLException;
+import java.sql.SQLXML;
+import java.sql.Savepoint;
+import java.sql.Statement;
+import java.sql.Time;
+import java.sql.Timestamp;
+import java.util.Map;
+import java.util.Properties;
+import java.util.concurrent.Executor;
+
+import org.apache.drill.jdbc.Driver;
+import org.apache.drill.jdbc.JdbcTest;
+import org.apache.drill.jdbc.AlreadyClosedSqlException;
+
+/**
+ * Currently, test for DRILL-2565--for key methods only:  for closed Connection,
+ * Statement, ResultSet, etc., object, throw some kind of "object already closed"
+ * SQLException,
+ *
+ * <p>
+ * TO BE:  Test for DRILL-2489--on closed Connection, Statement, ResultSet, etc.,
+ * objects, most methods must throw some kind of "object already closed" SQLException,
+ * but few do.
+ * </p>
+ * <p>
+ *  NOTE:  Test currently covers only {@link Connection}, {@link Statement},
+ *  {@link ResultSet} and part of {@link DatabaseMetaData} (but not
+ *  {@link Statement} subclasses, {@link ResultsetMetadata}, or any relevant
+ *  secondary objects such as {@link Clob} or {@link Array}.
+ * </p>
+ */
+public class Drill2489CallsAfterCloseThrowExceptionsTest extends JdbcTest {
+
+  private static Connection closedConnection;
+  private static Statement closedStatement;
+  private static ResultSet closedResultSet;
+  private static DatabaseMetaData closedDatabaseMetaData;
+
+  @BeforeClass
+  public static void setUpConnection() throws Exception {
+    final Connection connection = new Driver().connect( "jdbc:drill:zk=local", null );
+    final Statement stmt = connection.createStatement();
+    final ResultSet result =
+        stmt.executeQuery( "SELECT * FROM INFORMATION_SCHEMA.CATALOGS" );
+    result.next();
+    final DatabaseMetaData dbmd = connection.getMetaData();
+
+    result.close();
+    closedResultSet = result;
+    stmt.close();
+    closedStatement = stmt;
+    connection.close();
+    closedConnection = connection;
+    closedDatabaseMetaData = dbmd;
+  }
+
+  ///////////////////////////////////////////////////////////////
+  // Connection methods:
+
+  ////////////////////////////////////////
+  // - methods that do _not_ throw exception for closed Connection:
+
+  public void testClosedConnection_close_doesNotThrow() throws SQLException {
+    closedConnection.close();
+  }
+
+  public void testClosedConnection_isClosed_returnsTrue() throws SQLException {
+    assertThat( closedConnection.isClosed(), equalTo( true ) );
+  }
+
+  public void testClosedConnection_isValid_returnsTrue() throws SQLException {
+    assertThat( closedConnection.isValid( 1_000 ), equalTo( true ) );
+  }
+
+  ////////////////////////////////////////
+  // - methods that do throw exception for closed Connection:
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_abort_throws() throws SQLException {
+    closedConnection.abort( (Executor) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_clearWarnings_throws() throws SQLException {
+    closedConnection.clearWarnings();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_commit_throws() throws SQLException {
+    closedConnection.commit();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_createArrayOf_throws() throws SQLException {
+    closedConnection.createArrayOf( "typeName" , (Object[]) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_createBlob_throws() throws SQLException {
+    closedConnection.createBlob();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_createClob_throws() throws SQLException {
+    closedConnection.createClob();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_createNClob_throws() throws SQLException {
+    closedConnection.createNClob();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_createSQLXML_throws() throws SQLException {
+    closedConnection.createSQLXML();
+  }
+
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_createStatement1_throws() throws SQLException {
+    closedConnection.createStatement();
+  }
+
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_createStatement2_throws() throws SQLException {
+    closedConnection.createStatement( -1, -2 );
+  }
+
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_createStatement3_throws() throws SQLException {
+    closedConnection.createStatement( -1, -2 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_createStruct_throws() throws SQLException {
+    closedConnection.createStruct( "typeName", (Object[]) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_getAutoCommit_throws() throws SQLException {
+    closedConnection.getAutoCommit();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_getCatalog_throws() throws SQLException {
+    closedConnection.getCatalog();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_getClientInfo1_throws() throws SQLException {
+    closedConnection.getClientInfo();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_getClientInfo2_throws() throws SQLException {
+    closedConnection.getClientInfo( " name" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_getHoldability_throws() throws SQLException {
+    closedConnection.getHoldability();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_getMetaData_throws() throws SQLException {
+    closedConnection.getMetaData();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_getNetworkTimeout_throws() throws SQLException {
+    closedConnection.getNetworkTimeout();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_getSchema_throws() throws SQLException {
+    closedConnection.getSchema();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_getTransactionIsolation_throws() throws SQLException {
+    closedConnection.getTransactionIsolation();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_getTypeMap_throws() throws SQLException {
+    closedConnection.getTypeMap();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_getWarnings_throws() throws SQLException {
+    closedConnection.getWarnings();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_isReadOnly_throws() throws SQLException {
+    closedConnection.isReadOnly();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_nativeSQL_throws() throws SQLException {
+    closedConnection.nativeSQL( "sql" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_prepareCall1_throws() throws SQLException {
+    closedConnection.prepareCall( "sql" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_prepareCall2_throws() throws SQLException {
+    closedConnection.prepareCall( "sql", -1, -2 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_prepareCall3_throws() throws SQLException {
+    closedConnection.prepareCall( "sql", -1, -2, -3 );
+  }
+
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_prepareStatement1_throws() throws SQLException {
+    closedConnection.prepareStatement( "sql" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_prepareStatement2_throws() throws SQLException {
+    closedConnection.prepareStatement( "sql", (String[]) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_prepareStatement3_throws() throws SQLException {
+    closedConnection.prepareStatement( "sql", -4 );
+  }
+
+  public void testClosedConnection_prepareStatement4_throws() throws SQLException {
+    closedConnection.prepareStatement( "sql", -1, -2 );
+  }
+
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_prepareStatement5_throws() throws SQLException {
+    closedConnection.prepareStatement( "sql", -1, -2, -3 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_prepareStatement6_throws() throws SQLException {
+    closedConnection.prepareStatement( "sql", (int[]) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_releaseSavepoint_throws() throws SQLException {
+    closedConnection.releaseSavepoint( (Savepoint) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_rollback1_throws() throws SQLException {
+    closedConnection.rollback();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_rollback2_throws() throws SQLException {
+    closedConnection.rollback( (Savepoint) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_setAutoCommit_throws() throws SQLException {
+    closedConnection.setAutoCommit( true );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_setCatalog_throws() throws SQLException {
+    closedConnection.setCatalog( "catalog" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_setClientInfo1_throws() throws SQLException {
+    closedConnection.setClientInfo( (Properties) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_setClientInfo2_throws() throws SQLException {
+    closedConnection.setClientInfo( "name", "value" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_setHoldability_throws() throws SQLException {
+    closedConnection.setHoldability( ResultSet.CLOSE_CURSORS_AT_COMMIT );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_setNetworkTimeout_throws() throws SQLException {
+    closedConnection.setNetworkTimeout( (Executor) null, 1_000 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_setReadOnly_throws() throws SQLException {
+    closedConnection.setReadOnly( true );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_setSavepoint1_throws() throws SQLException {
+    closedConnection.setSavepoint();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_setSavepoint2_throws() throws SQLException {
+    closedConnection.setSavepoint( "name" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_setSchema_throws() throws SQLException {
+    closedConnection.setSchema( "schema" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_setTransactionIsolation_throws() throws SQLException {
+    closedConnection.setTransactionIsolation( -1 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedConnection_setTypeMap_throws() throws SQLException {
+    closedConnection.setTypeMap( (Map<String,Class<?>>) null );
+  }
+
+
+  ///////////////////////////////////////////////////////////////
+  // Statement methods:
+
+  ////////////////////////////////////////
+  // - methods that do _not_ throw exception for closed Statement:
+
+  public void testClosedStatement_close_doesNotThrow() throws SQLException {
+    closedStatement.close();
+  }
+
+  public void testClosedStatement_isClosed_returnsTrue() throws SQLException {
+    assertThat( closedStatement.isClosed(), equalTo( true ) );
+  }
+
+  ////////////////////////////////////////
+  // - methods that do throw exception for closed Statement:
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_addBatch_throws() throws SQLException {
+    closedStatement.addBatch( "USE dfs.tmp" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_cancel_throws() throws SQLException {
+    closedStatement.cancel();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_clearBatch_throws() throws SQLException {
+    closedStatement.clearBatch();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_clearWarnings_throws() throws SQLException {
+    closedStatement.clearWarnings();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_execute1_throws() throws SQLException {
+    closedStatement.execute( "USE dfs.tmp", Statement.RETURN_GENERATED_KEYS );
+  }
+
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_execute2_throws() throws SQLException {
+    closedStatement.execute( "USE dfs.tmp" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_execute3_throws() throws SQLException {
+    closedStatement.execute( "USE dfs.tmp", (int[]) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_execute4_throws() throws SQLException {
+    closedStatement.execute( "USE dfs.tmp", (String[]) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_executeBatch_throws() throws SQLException {
+    closedStatement.executeBatch();
+  }
+
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_executeQuery_throws() throws SQLException {
+    closedStatement.executeQuery( "USE dfs.tmp" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_executeUpdate1_throws() throws SQLException {
+    closedStatement.executeUpdate( "USE dfs.tmp", Statement.RETURN_GENERATED_KEYS );
+  }
+
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_executeUpdate2_throws() throws SQLException {
+    closedStatement.executeUpdate( "USE dfs.tmp", (int[]) null );
+  }
+
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_executeUpdate3_throws() throws SQLException {
+    closedStatement.executeUpdate( "USE dfs.tmp", (String[]) null );
+  }
+
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_executeUpdate4_throws() throws SQLException {
+    closedStatement.executeUpdate( "USE dfs.tmp" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_getConnection_throws() throws SQLException {
+    closedStatement.getConnection();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_getFetchDirection_throws() throws SQLException {
+    closedStatement.getFetchDirection();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_getFetchSize_throws() throws SQLException {
+    closedStatement.getFetchSize();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_getGeneratedKeys_throws() throws SQLException {
+    closedStatement.getGeneratedKeys();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_getMaxFieldSize_throws() throws SQLException {
+    closedStatement.getMaxFieldSize();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_getMaxRows_throws() throws SQLException {
+    closedStatement.getMaxRows();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_getMoreResults1_throws() throws SQLException {
+    closedStatement.getMoreResults();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_getMoreResults2_throws() throws SQLException {
+    closedStatement.getMoreResults( 1 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_getQueryTimeout_throws() throws SQLException {
+    closedStatement.getQueryTimeout();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_getResultSet_throws() throws SQLException {
+    closedStatement.getResultSet();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_getResultSetConcurrency_throws() throws SQLException {
+    closedStatement.getResultSetConcurrency();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_getResultSetHoldability_throws() throws SQLException {
+    closedStatement.getResultSetHoldability();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_getResultSetType_throws() throws SQLException {
+    closedStatement.getResultSetType();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_getUpdateCount_throws() throws SQLException {
+    closedStatement.getUpdateCount();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_getWarnings_throws() throws SQLException {
+    closedStatement.getWarnings();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_isCloseOnCompletion_throws() throws SQLException {
+    closedStatement.isCloseOnCompletion();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_isPoolable_throws() throws SQLException {
+    closedStatement.isPoolable();
+  }
+
+   @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_setCursorName_throws() throws SQLException {
+    closedStatement.setCursorName( "name" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_setEscapeProcessing_throws() throws SQLException {
+    closedStatement.setEscapeProcessing( true );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_setFetchDirection_throws() throws SQLException {
+    closedStatement.setFetchDirection( 123 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_setFetchSize_throws() throws SQLException {
+    closedStatement.setFetchSize( 1 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_setMaxFieldSize_throws() throws SQLException {
+    closedStatement.setMaxFieldSize( 1 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_setMaxRows_throws() throws SQLException {
+    closedStatement.setMaxRows(1 );
+  }
+
+   @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_setQueryTimeout_throws() throws SQLException {
+    closedStatement.setQueryTimeout( 60 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedStatement_setPoolable_throws() throws SQLException {
+    closedStatement.setPoolable( false );
+  }
+
+
+  ///////////////////////////////////////////////////////////////
+  // ResultSet methods:
+
+  ////////////////////////////////////////
+  // - methods that do _not_ throw exception for closed ResultSet:
+
+  public void testClosedResultSet_close_doesNotThrow() throws SQLException {
+    closedResultSet.close();
+  }
+
+  public void testClosedResultSet_isClosed_returnsTrue() throws SQLException {
+    assertThat( closedResultSet.isClosed(), equalTo( true ) );
+  }
+
+  ///////////////////////////////////////////////////////////////
+  // PreparedStatement methods:
+
+  ////////////////////////////////////////
+  // - methods that do _not_ throw exception for closed PreparedStatement:
+
+  ////////////////////////////////////////
+  // - methods that do throw exception for closed PreparedStatement:
+
+  // TODO
+
+
+  ///////////////////////////////////////////////////////////////
+  // CallableStatement methods:
+
+  ////////////////////////////////////////
+  // - methods that do _not_ throw exception for closed CallableStatement:
+
+  ////////////////////////////////////////
+  // - methods that do throw exception for closed CallableStatement:
+
+  // TODO
+
+
+  ////////////////////////////////////////
+  // - methods that do throw exception for closed ResultSet:
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_absolute_throws() throws SQLException {
+    closedResultSet.absolute( 1 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_afterLast_throws() throws SQLException {
+    closedResultSet.afterLast();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_beforeFirst_throws() throws SQLException {
+    closedResultSet.beforeFirst();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_cancelRowUpdates_throws() throws SQLException {
+    closedResultSet.cancelRowUpdates();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_clearWarnings_throws() throws SQLException {
+    closedResultSet.clearWarnings();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_deleteRow_throws() throws SQLException {
+    closedResultSet.deleteRow();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_findColumn_throws() throws SQLException {
+    closedResultSet.findColumn( "columnLabel" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_first_throws() throws SQLException {
+    closedResultSet.first();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getArray1_throws() throws SQLException {
+    closedResultSet.getArray( 1 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getArray2_throws() throws SQLException {
+    closedResultSet.getArray( "columnLabel" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getAsciiStream1_throws() throws SQLException {
+    closedResultSet.getAsciiStream( 123 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getAsciiStream2_throws() throws SQLException {
+    closedResultSet.getAsciiStream( "columnLabel" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getBigDecimal1_throws() throws SQLException {
+    closedResultSet.getBigDecimal( 123 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  @SuppressWarnings("deprecation")
+  public void testClosedResultSet_getBigDecimal2_throws() throws SQLException {
+    closedResultSet.getBigDecimal( 123, 2 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getBigDecimal3_throws() throws SQLException {
+    closedResultSet.getBigDecimal( "columnLabel" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  @SuppressWarnings("deprecation")
+  public void testClosedResultSet_getBigDecimal_throws() throws SQLException {
+    closedResultSet.getBigDecimal( "columnLabel", 2 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getBinaryStream1_throws() throws SQLException {
+    closedResultSet.getBinaryStream( 123 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getBinaryStream2_throws() throws SQLException {
+    closedResultSet.getBinaryStream( "columnLabel" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getBlob1_throws() throws SQLException {
+    closedResultSet.getBlob( 123 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getBlob2_throws() throws SQLException {
+    closedResultSet.getBlob( "columnLabel" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getBoolean1_throws() throws SQLException {
+    closedResultSet.getBoolean( 123 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getBoolean2_throws() throws SQLException {
+    closedResultSet.getBoolean( "columnLabel" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getByte1_throws() throws SQLException {
+    closedResultSet.getByte( 123 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getByte2_throws() throws SQLException {
+    closedResultSet.getByte( "columnLabel" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getBytes1_throws() throws SQLException {
+    closedResultSet.getBytes( 123 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getBytes2_throws() throws SQLException {
+    closedResultSet.getBytes( "columnLabel" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getCharacterStream1_throws() throws SQLException {
+    closedResultSet.getCharacterStream( 123 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getCharacterStream2_throws() throws SQLException {
+    closedResultSet.getCharacterStream( "columnLabel" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getClob1_throws() throws SQLException {
+    closedResultSet.getClob( 123 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getClob2_throws() throws SQLException {
+    closedResultSet.getClob( "columnLabel" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getConcurrency_throws() throws SQLException {
+    closedResultSet.getConcurrency();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getCursorName_throws() throws SQLException {
+    closedResultSet.getCursorName();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getDate1_throws() throws SQLException {
+    closedResultSet.getDate( 123 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getDate2_throws() throws SQLException {
+    closedResultSet.getDate( 123, null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getDate3_throws() throws SQLException {
+    closedResultSet.getDate( "columnLabel" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getDate4_throws() throws SQLException {
+    closedResultSet.getDate( "columnLabel", null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getDouble1_throws() throws SQLException {
+    closedResultSet.getDouble( 123 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getDouble2_throws() throws SQLException {
+    closedResultSet.getDouble( "columnLabel" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getFetchDirection_throws() throws SQLException {
+    closedResultSet.getFetchDirection();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getFetchSize_throws() throws SQLException {
+    closedResultSet.getFetchSize();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getFloat1_throws() throws SQLException {
+    closedResultSet.getFloat( 123 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getFloat2_throws() throws SQLException {
+    closedResultSet.getFloat( "columnLabel" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getHoldability_throws() throws SQLException {
+    closedResultSet.getHoldability();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getInt1_throws() throws SQLException {
+    closedResultSet.getInt( 123 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getInt2_throws() throws SQLException {
+    closedResultSet.getInt( "columnLabel" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getLong1_throws() throws SQLException {
+    closedResultSet.getLong( 123 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getLong2_throws() throws SQLException {
+    closedResultSet.getLong( "columnLabel" );
+  }
+
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getMetaData_throws() throws SQLException {
+    closedResultSet.getMetaData();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getNCharacterStream1_throws() throws SQLException {
+    closedResultSet.getNCharacterStream( 123 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getNCharacterStream2_throws() throws SQLException {
+    closedResultSet.getNCharacterStream( "columnLabel" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getNClob1_throws() throws SQLException {
+    closedResultSet.getNClob( 123 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getNClob2_throws() throws SQLException {
+    closedResultSet.getNClob( "columnLabel" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getNString1_throws() throws SQLException {
+    closedResultSet.getNString( 123 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getNString2_throws() throws SQLException {
+    closedResultSet.getNString( "columnLabel" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getObject1_throws() throws SQLException {
+    closedResultSet.getObject( 123 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getObject2_throws() throws SQLException {
+    closedResultSet.getObject( 123, String.class );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getObject3_throws() throws SQLException {
+    closedResultSet.getObject( 123, (Map<String,Class<?>>) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getObject4_throws() throws SQLException {
+    closedResultSet.getObject( "columnLabel" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getObject5_throws() throws SQLException {
+    closedResultSet.getObject( "columnLabel", String.class );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getObject6_throws() throws SQLException {
+    closedResultSet.getObject( "columnLabel", (Map<String,Class<?>>) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getRef1_throws() throws SQLException {
+    closedResultSet.getRef( 123 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getRef2_throws() throws SQLException {
+    closedResultSet.getRef( "columnLabel" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getRow_throws() throws SQLException {
+    closedResultSet.getRow();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getRowId1_throws() throws SQLException {
+    closedResultSet.getRowId( 123 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getRowId2_throws() throws SQLException {
+    closedResultSet.getRowId( "columnLabel" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getShort1_throws() throws SQLException {
+    closedResultSet.getShort( 123 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getShort2_throws() throws SQLException {
+    closedResultSet.getShort( "columnLabel" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getSQLXML1_throws() throws SQLException {
+    closedResultSet.getSQLXML( 123 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getSQLXML2_throws() throws SQLException {
+    closedResultSet.getSQLXML( "columnLabel" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getStatement_throws() throws SQLException {
+    closedResultSet.getStatement();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getString1_throws() throws SQLException {
+    closedResultSet.getString( 123 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getString2_throws() throws SQLException {
+    closedResultSet.getString( "columnLabel" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getTime1_throws() throws SQLException {
+    closedResultSet.getTime( 123 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getTime2_throws() throws SQLException {
+    closedResultSet.getTime( 123, null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getTime3_throws() throws SQLException {
+    closedResultSet.getTime( "columnLabel" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getTime4_throws() throws SQLException {
+    closedResultSet.getTime( "columnLabel", null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getTimestamp1_throws() throws SQLException {
+    closedResultSet.getTimestamp( 123 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getTimestamp2_throws() throws SQLException {
+    closedResultSet.getTimestamp( 123, null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getTimestamp3_throws() throws SQLException {
+    closedResultSet.getTimestamp( "columnLabel" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getTimestamp4_throws() throws SQLException {
+    closedResultSet.getTimestamp( "columnLabel", null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getType_throws() throws SQLException {
+    closedResultSet.getType();
+  }
+
+  @Test( expected = AlreadyClosedSqlException.class )
+  @SuppressWarnings("deprecation")
+  @Ignore( "until DRILL-2489 addressed" )
+  public void testClosedResultSet_getUnicodeStream1_throws() throws SQLException {
+    closedResultSet.getUnicodeStream( 123 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  @SuppressWarnings("deprecation")
+  public void testClosedResultSet_getUnicodeStream2_throws() throws SQLException {
+    closedResultSet.getUnicodeStream( "columnLabel" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getURL1_throws() throws SQLException {
+    closedResultSet.getURL( 123 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getURL2_throws() throws SQLException {
+    closedResultSet.getURL( "columnLabel" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_getWarnings_throws() throws SQLException {
+    closedResultSet.getWarnings();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_insertRow_throws() throws SQLException {
+    closedResultSet.insertRow();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_isAfterLast_throws() throws SQLException {
+    closedResultSet.isAfterLast();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_isBeforeFirst_throws() throws SQLException {
+    closedResultSet.isBeforeFirst();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_isFirst_throws() throws SQLException {
+    closedResultSet.isFirst();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_isLast_throws() throws SQLException {
+    closedResultSet.isLast();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_last_throws() throws SQLException {
+    closedResultSet.last();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_moveToCurrentRow_throws() throws SQLException {
+    closedResultSet.moveToCurrentRow();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_moveToInsertRow_throws() throws SQLException {
+    closedResultSet.moveToInsertRow();
+  }
+
+  public void testClosedResultSet_next_throws() throws SQLException {
+    closedResultSet.next();
+  }
+
+   @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_previous_throws() throws SQLException {
+    closedResultSet.previous();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_refreshRow_throws() throws SQLException {
+    closedResultSet.refreshRow();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_relative_throws() throws SQLException {
+    closedResultSet.relative( 2 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_rowDeleted_throws() throws SQLException {
+    closedResultSet.rowDeleted();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_rowInserted_throws() throws SQLException {
+    closedResultSet.rowInserted();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_rowUpdated_throws() throws SQLException {
+    closedResultSet.rowUpdated();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_setFetchDirection_throws() throws SQLException {
+    closedResultSet.setFetchDirection( -123 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_setFetchSize_throws() throws SQLException {
+    closedResultSet.setFetchSize( 1 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateArray1_throws() throws SQLException {
+    closedResultSet.updateArray( 123, (Array) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateArray_throws() throws SQLException {
+    closedResultSet.updateArray( "columnLabel2", (Array) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateAsciiStream1_throws() throws SQLException {
+    closedResultSet.updateAsciiStream( 123, (InputStream) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateAsciiStream2_throws() throws SQLException {
+    closedResultSet.updateAsciiStream( 123, (InputStream) null, 12 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateAsciiStream3_throws() throws SQLException {
+    closedResultSet.updateAsciiStream( 123, (InputStream) null, 12 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateAsciiStream4_throws() throws SQLException {
+    closedResultSet.updateAsciiStream( "columnLabel", (InputStream) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateAsciiStream5_throws() throws SQLException {
+    closedResultSet.updateAsciiStream( "columnLabel", (InputStream) null, 12 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateAsciiStream6_throws() throws SQLException {
+    closedResultSet.updateAsciiStream( "columnLabel", (InputStream) null, 12 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateBigDecimal1_throws() throws SQLException {
+    closedResultSet.updateBigDecimal( 123, (BigDecimal) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateBigDecimal2_throws() throws SQLException {
+    closedResultSet.updateBigDecimal( "columnLabel", (BigDecimal) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateBinaryStream3_throws() throws SQLException {
+    closedResultSet.updateBinaryStream( 123, (InputStream) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateBinaryStream4_throws() throws SQLException {
+    closedResultSet.updateBinaryStream( 123, (InputStream) null, 12 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateBinaryStream5_throws() throws SQLException {
+    closedResultSet.updateBinaryStream( 123, (InputStream) null, 12 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateBinaryStream6_throws() throws SQLException {
+    closedResultSet.updateBinaryStream( "columnLabel", (InputStream) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateBinaryStream7_throws() throws SQLException {
+    closedResultSet.updateBinaryStream( "columnLabel", (InputStream) null, 12 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateBinaryStream8_throws() throws SQLException {
+    closedResultSet.updateBinaryStream( "columnLabel", (InputStream) null, 12 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateBlob1_throws() throws SQLException {
+    closedResultSet.updateBlob( 123, (Blob) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateBlob2_throws() throws SQLException {
+    closedResultSet.updateBlob( 123, (InputStream) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateBlob3_throws() throws SQLException {
+    closedResultSet.updateBlob( 123, (InputStream) null, 12 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateBlob4_throws() throws SQLException {
+    closedResultSet.updateBlob( "columnLabel", (Blob) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateBlob5_throws() throws SQLException {
+    closedResultSet.updateBlob( "columnLabel", (InputStream) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateBlob6_throws() throws SQLException {
+    closedResultSet.updateBlob( "columnLabel", (InputStream) null, 12 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateBoolean1_throws() throws SQLException {
+    closedResultSet.updateBoolean( 123, true );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateBoolean2_throws() throws SQLException {
+    closedResultSet.updateBoolean( "columnLabel", true );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateByte1_throws() throws SQLException {
+    closedResultSet.updateByte( 123, (byte) 0 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateByte2_throws() throws SQLException {
+    closedResultSet.updateByte( "columnLabel", (byte) 0 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateBytes1_throws() throws SQLException {
+    closedResultSet.updateBytes( 123, (byte[]) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateBytes2_throws() throws SQLException {
+    closedResultSet.updateBytes( "columnLabel", (byte[]) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateCharacterStream1_throws() throws SQLException {
+    closedResultSet.updateCharacterStream( 123, (Reader) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateCharacterStream2_throws() throws SQLException {
+    closedResultSet.updateCharacterStream( 123, (Reader)  null, 12 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateCharacterStream3_throws() throws SQLException {
+    closedResultSet.updateCharacterStream( 123, (Reader)  null, 12 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateCharacterStream4_throws() throws SQLException {
+    closedResultSet.updateCharacterStream( "columnLabel", (Reader) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateCharacterStream5_throws() throws SQLException {
+    closedResultSet.updateCharacterStream( "columnLabel", (Reader) null, 12 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateCharacterStream6_throws() throws SQLException {
+    closedResultSet.updateCharacterStream( "columnLabel", (Reader) null, 12 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateClob1_throws() throws SQLException {
+    closedResultSet.updateClob( 123, (Clob) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateClob2_throws() throws SQLException {
+    closedResultSet.updateClob( 123, (Reader) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateClob3_throws() throws SQLException {
+    closedResultSet.updateClob( 123, (Reader) null, 12 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateClob4_throws() throws SQLException {
+    closedResultSet.updateClob( "columnLabel", (Clob) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateClob5_throws() throws SQLException {
+    closedResultSet.updateClob( "columnLabel", (Reader) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateClob6_throws() throws SQLException {
+    closedResultSet.updateClob( "columnLabel", (Reader) null, 12 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateDate1() throws SQLException {
+    closedResultSet.updateDate( 123, (Date) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateDate2_throws() throws SQLException {
+    closedResultSet.updateDate( "columnLabel", (Date) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateDouble1_throws() throws SQLException {
+    closedResultSet.updateDouble( 123, (double) 123 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateDouble2_throws() throws SQLException {
+    closedResultSet.updateDouble( "columnLabel", 456 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateFloat1_throws() throws SQLException {
+    closedResultSet.updateFloat( 123, 1f );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateFloat2_throws() throws SQLException {
+    closedResultSet.updateFloat( "columnLabel", 345 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateInt1_throws() throws SQLException {
+    closedResultSet.updateInt( 123, 1 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateInt2_throws() throws SQLException {
+    closedResultSet.updateInt( "columnLabel", 234 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateLong1_throws() throws SQLException {
+    closedResultSet.updateLong( 123, 234 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateLong2_throws() throws SQLException {
+    closedResultSet.updateLong( "columnLabel", 234 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateNCharacterStream1_throws() throws SQLException {
+    closedResultSet.updateNCharacterStream( 123, (Reader) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateNCharacterStream2_throws() throws SQLException {
+    closedResultSet.updateNCharacterStream( 123, (Reader) null, 12 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateNCharacterStream3_throws() throws SQLException {
+    closedResultSet.updateNCharacterStream( "columnLabel", (Reader) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateNCharacterStream4_throws() throws SQLException {
+    closedResultSet.updateNCharacterStream( "columnLabel", (Reader) null, 12 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateNClob1_throws() throws SQLException {
+    closedResultSet.updateNClob( 123, (NClob) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateNClob2_throws() throws SQLException {
+    closedResultSet.updateNClob( 123, (Reader) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateNClob3_throws() throws SQLException {
+    closedResultSet.updateNClob( 123, (Reader) null, 12 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateNClob4_throws() throws SQLException {
+    closedResultSet.updateNClob( "columnLabel", (NClob) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateNClob5_throws() throws SQLException {
+    closedResultSet.updateNClob( "columnLabel", (Reader) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateNClob6_throws() throws SQLException {
+    closedResultSet.updateNClob( "columnLabel", (Reader) null, 12 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateNString1_throws() throws SQLException {
+    closedResultSet.updateNString( 123, (String) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateNString2_throws() throws SQLException {
+    closedResultSet.updateNString( "columnLabel", (String) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateNull1_throws() throws SQLException {
+    closedResultSet.updateNull( 123 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateNull2_throws() throws SQLException {
+    closedResultSet.updateNull( "columnLabel" );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateObject1_throws() throws SQLException {
+    closedResultSet.updateObject( 123, (Object) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateObject2_throws() throws SQLException {
+    closedResultSet.updateObject( 123, (Object) null, 7 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateObject3_throws() throws SQLException {
+    closedResultSet.updateObject( "columnLabel", (Object) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateObject4_throws() throws SQLException {
+    closedResultSet.updateObject( "columnLabel", (Object) null, 17 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateRef1_throws() throws SQLException {
+    closedResultSet.updateRef( 123, (Ref) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateRef2_throws() throws SQLException {
+    closedResultSet.updateRef( "columnLabel", (Ref) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateRow_throws() throws SQLException {
+    closedResultSet.updateRow();
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateRowId1_throws() throws SQLException {
+    closedResultSet.updateRowId( 123, (RowId) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateRowId2_throws() throws SQLException {
+    closedResultSet.updateRowId( "columnLabel", (RowId) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateShort1_throws() throws SQLException {
+    closedResultSet.updateShort( 123, (short) 127 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateShort2_throws() throws SQLException {
+    closedResultSet.updateShort( "columnLabel", (short) 127 );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateSQLXML1_throws() throws SQLException {
+    closedResultSet.updateSQLXML( 123, (SQLXML) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateSQLXML2_throws() throws SQLException {
+    closedResultSet.updateSQLXML( "columnLabel", (SQLXML) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateString1_throws() throws SQLException {
+    closedResultSet.updateString( 123, (String) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateString2_throws() throws SQLException {
+    closedResultSet.updateString( "columnLabel", (String) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateTime1_throws() throws SQLException {
+    closedResultSet.updateTime( 123, (Time) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateTime2_throws() throws SQLException {
+    closedResultSet.updateTime( "columnLabel", (Time) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateTimestamp1_throws() throws SQLException {
+    closedResultSet.updateTimestamp( 123, (Timestamp) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_updateTimestamp2_throws() throws SQLException {
+    closedResultSet.updateTimestamp( "columnLabel", (Timestamp) null );
+  }
+
+  @Ignore( "until DRILL-2489 addressed" )
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedResultSet_wasNull_throws() throws SQLException {
+    closedResultSet.wasNull();
+  }
+
+
+  ///////////////////////////////////////////////////////////////
+  // ResultSetMetadata methods:
+
+  ////////////////////////////////////////
+  // - methods that do _not_ throw exception for closed ResultSetMetadata:
+
+  // TODO
+
+  ////////////////////////////////////////
+  // - methods that do throw exception for closed ResultSetMetadata:
+
+  // None?
+
+
+  ///////////////////////////////////////////////////////////////
+  // DatabaseMetaData methods:
+
+  ////////////////////////////////////////
+  // - methods that do _not_ throw exception for closed DatabaseMetaData:
+
+  ////////////////////////////////////////
+  // - methods that do throw exception for closed DatabaseMetaData:
+
+  // TODO
+
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedDatabaseMetaData_getCatalog_throws() throws SQLException {
+    closedDatabaseMetaData.getCatalogs();
+  }
+
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedDatabaseMetaData_getSchemas_throws() throws SQLException {
+    closedDatabaseMetaData.getSchemas( null, null);
+  }
+
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedDatabaseMetaData_getTables_throws() throws SQLException {
+    closedDatabaseMetaData.getTables( null, null, null, null );
+  }
+
+  @Test( expected = AlreadyClosedSqlException.class )
+  public void testClosedDatabaseMetaData_getColumns_throws() throws SQLException {
+    closedDatabaseMetaData.getColumns( null, null, null, null );
+  }
+
+}