drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From par...@apache.org
Subject [04/10] drill git commit: DRILL-3216: Part 1--Pre-core code hygiene.
Date Wed, 17 Jun 2015 20:30:34 GMT
http://git-wip-us.apache.org/repos/asf/drill/blob/b018234f/exec/jdbc/src/test/java/org/apache/drill/jdbc/DatabaseMetaDataGetColumnsTest.java
----------------------------------------------------------------------
diff --git a/exec/jdbc/src/test/java/org/apache/drill/jdbc/DatabaseMetaDataGetColumnsTest.java b/exec/jdbc/src/test/java/org/apache/drill/jdbc/DatabaseMetaDataGetColumnsTest.java
index a4fccf6..3775be0 100644
--- a/exec/jdbc/src/test/java/org/apache/drill/jdbc/DatabaseMetaDataGetColumnsTest.java
+++ b/exec/jdbc/src/test/java/org/apache/drill/jdbc/DatabaseMetaDataGetColumnsTest.java
@@ -51,7 +51,7 @@ import java.sql.Types;
 //   radix for each numeric type:
 //   - 2 or 10 for SMALLINT, INTEGER, and BIGINT;
 //   - only 10 for NUMERIC and DECIMAL; and
-//   - only 2  for REAL, DOUBLE PRECISION, and FLOAT.
+//   - only 2  for REAL, FLOAT, and DOUBLE PRECISION.
 //   However, it is not clear what the JDBC API intends:
 //   - It has NUM_PREC_RADIX, specifying a radix or 10 or 2, but doesn't specify
 //     exactly what is applies to.  Apparently, it applies to COLUMN_SIZE abd
@@ -82,10 +82,10 @@ import java.sql.Types;
  */
 public class DatabaseMetaDataGetColumnsTest extends JdbcTestBase {
 
+  private static final String VIEW_SCHEMA = "dfs_test.tmp";
   private static final String VIEW_NAME =
       DatabaseMetaDataGetColumnsTest.class.getSimpleName() + "_View";
 
-
   /** The one shared JDBC connection to Drill. */
   private static Connection connection;
 
@@ -105,8 +105,6 @@ public class DatabaseMetaDataGetColumnsTest extends JdbcTestBase {
 
   //////////
   // For columns in temporary test view (types accessible via casting):
-  // TODO:  Determine whether any other data types are accessible via CAST
-  // and add them.
 
   private static ResultSet mdrOptBOOLEAN;
 
@@ -115,9 +113,9 @@ public class DatabaseMetaDataGetColumnsTest extends JdbcTestBase {
   private static ResultSet mdrReqINTEGER;
   private static ResultSet mdrOptBIGINT;
 
+  private static ResultSet mdrOptREAL;
   private static ResultSet mdrOptFLOAT;
   private static ResultSet mdrReqDOUBLE;
-  private static ResultSet mdrOptREAL;
 
   private static ResultSet mdrReqDECIMAL_5_3;
   // No NUMERIC while Drill just maps it to DECIMAL.
@@ -134,6 +132,7 @@ public class DatabaseMetaDataGetColumnsTest extends JdbcTestBase {
   private static ResultSet mdrOptTIME_7;
   private static ResultSet mdrOptTIMESTAMP;
   // No "... WITH TIME ZONE" in Drill.
+
   private static ResultSet mdrOptINTERVAL_H_S3;
   private static ResultSet mdrOptINTERVAL_Y4;
 
@@ -145,21 +144,24 @@ public class DatabaseMetaDataGetColumnsTest extends JdbcTestBase {
   private static ResultSet mdrReqMAP;
   // structtype column:    STRUCT(INTEGER sint, BOOLEAN sboolean,
   //                              VARCHAR(65535) sstring), non-null(?):
-  private static ResultSet testRowSTRUCT;
+  private static ResultSet mdrUnkSTRUCT;
   // uniontypetype column: OTHER (?), non=nullable(?):
-  private static ResultSet testRowUnion;
+  private static ResultSet mdrUnkUnion;
 
 
   private static ResultSet setUpRow( final String schemaName,
                                      final String tableOrViewName,
                                      final String columnName ) throws SQLException
   {
-    System.out.println( "(Setting up row for " + tableOrViewName + "." + columnName + ".)");
-    assertNotNull("dbMetadata is null; must be set before calling setUpRow(...)", dbMetadata);
+    System.out.println( "(Setting up row for " + tableOrViewName + "."
+                        + columnName + ".)");
+    assertNotNull( "dbMetadata is null; must be set before calling setUpRow(...)",
+                   dbMetadata );
     final ResultSet testRow =
         dbMetadata.getColumns( "DRILL", schemaName, tableOrViewName, columnName );
-    assertTrue("Test setup error:  No row for column DRILL . `" + schemaName + "` . `"
-            + tableOrViewName + "` . `" + columnName + "`", testRow.next());
+    assertTrue( "Test setup error:  No row for column DRILL . `" + schemaName
+                + "` . `" + tableOrViewName + "` . `" + columnName + "`",
+                testRow.next() );
     return testRow;
   }
 
@@ -170,13 +172,14 @@ public class DatabaseMetaDataGetColumnsTest extends JdbcTestBase {
     // (Note: Can't use JdbcTest's connect(...) because JdbcTest closes
     // Connection--and other JDBC objects--on test method failure, but this test
     // class uses some objects across methods.)
-    connection = new Driver().connect( "jdbc:drill:zk=local", JdbcAssert.getDefaultProperties());
+    connection = new Driver().connect( "jdbc:drill:zk=local",
+                                       JdbcAssert.getDefaultProperties() );
     dbMetadata = connection.getMetaData();
     final Statement stmt = connection.createStatement();
 
     ResultSet util;
 
-    /* TODO(start): Uncomment this block once we have a test plugin which supports all the needed types.
+    /* TODO(DRILL-3253)(start): Update this once we have test plugin supporting all needed types
     // Create Hive test data, only if not created already (speed optimization):
     util = stmt.executeQuery( "SELECT * FROM INFORMATION_SCHEMA.COLUMNS "
                               + "WHERE TABLE_SCHEMA = 'hive_test.default' "
@@ -201,43 +204,42 @@ public class DatabaseMetaDataGetColumnsTest extends JdbcTestBase {
       fail("Expected 17 Hive test columns see " + hiveTestColumnRowCount + "."
             + "  Test code is out of date or Hive data is corrupted.");
     }
-    TODO(end) */
-
-    // Note: Assertions must be enabled (as they have been so far in tests).
+    TODO(DRILL-3253)(end) */
 
     // Create temporary test-columns view:
     util = stmt.executeQuery( "USE dfs_test.tmp" );
     assertTrue( util.next() );
-    assertTrue( "Error setting schema for test: " + util.getString( 2 ), util.getBoolean( 1 ) );
+    assertTrue( "Error setting schema for test: " + util.getString( 2 ),
+                util.getBoolean( 1 ) );
     util = stmt.executeQuery(
         ""
-        +   "CREATE OR REPLACE VIEW " + VIEW_NAME + " AS SELECT  "
-        + "\n  CAST( NULL         AS BOOLEAN             ) AS optBOOLEAN,      "
-        + "\n"
-        + "\n  CAST(    1         AS TINYINT             ) AS reqTINYINT,      "
-        + "\n  CAST( NULL         AS SMALLINT            ) AS optSMALLINT,     "
-        + "\n  CAST(    2         AS INTEGER             ) AS reqINTEGER,      "
-        + "\n  CAST( NULL         AS BIGINT              ) AS optBIGINT,       "
-        + "\n"
-        + "\n  CAST( NULL         AS FLOAT               ) AS optFLOAT,        "
-        + "\n  CAST(  3.3         AS DOUBLE              ) AS reqDOUBLE,       "
-        + "\n  CAST( NULL         AS REAL                ) AS optREAL,         "
-        + "\n"
-        + "\n  CAST(  4.4         AS DECIMAL(5,3)        ) AS reqDECIMAL_5_3,  "
-        + "\n"
-        + "\n  CAST( 'Hi'         AS VARCHAR(10)         ) AS reqVARCHAR_10,   "
-        + "\n  CAST( NULL         AS VARCHAR             ) AS optVARCHAR,      "
-        + "\n  CAST( '55'         AS CHAR(5)             ) AS reqCHAR_5,       "
-        + "\n  CAST( NULL         AS VARBINARY(16)       ) AS optVARBINARY_16, "
-        + "\n  CAST( NULL         AS VARBINARY(1048576)  ) AS optBINARY_1048576, "
-        + "\n  CAST( NULL         AS BINARY(8)           ) AS optBINARY_8,     "
-        + "\n"
-        + "\n  CAST( '2015-01-01' AS DATE                ) AS reqDATE,         "
-        + "\n  CAST( NULL         AS TIME                ) AS optTIME,         "
-        + "\n  CAST( NULL         AS TIME(7)             ) AS optTIME_7,       "
-        + "\n  CAST( NULL         AS TIMESTAMP           ) AS optTIMESTAMP,    "
-        + "\n  CAST( NULL  AS INTERVAL HOUR TO SECOND(3) ) AS optINTERVAL_H_S3, "
-        + "\n  CAST( NULL  AS INTERVAL YEAR(4)           ) AS optINTERVAL_Y4,  "
+        +   "CREATE OR REPLACE VIEW " + VIEW_NAME + " AS SELECT "
+        + "\n  CAST( NULL    AS BOOLEAN            ) AS mdrOptBOOLEAN,        "
+        + "\n  "
+        + "\n  CAST(    1    AS TINYINT            ) AS mdrReqTINYINT,        "
+        + "\n  CAST( NULL    AS SMALLINT           ) AS mdrOptSMALLINT,       "
+        + "\n  CAST(    2    AS INTEGER            ) AS mdrReqINTEGER,        "
+        + "\n  CAST( NULL    AS BIGINT             ) AS mdrOptBIGINT,         "
+        + "\n  "
+        + "\n  CAST( NULL    AS REAL               ) AS mdrOptREAL,           "
+        + "\n  CAST( NULL    AS FLOAT              ) AS mdrOptFLOAT,          "
+        + "\n  CAST(  3.3    AS DOUBLE             ) AS mdrReqDOUBLE,         "
+        + "\n  "
+        + "\n  CAST(  4.4    AS DECIMAL(5,3)       ) AS mdrReqDECIMAL_5_3,    "
+        + "\n  "
+        + "\n  CAST( 'Hi'    AS VARCHAR(10)        ) AS mdrReqVARCHAR_10,     "
+        + "\n  CAST( NULL    AS VARCHAR            ) AS mdrOptVARCHAR,        "
+        + "\n  CAST( '55'    AS CHAR(5)            ) AS mdrReqCHAR_5,         "
+        + "\n  CAST( NULL    AS VARBINARY(16)      ) AS mdrOptVARBINARY_16,   "
+        + "\n  CAST( NULL    AS VARBINARY(1048576) ) AS mdrOptBINARY_1048576, "
+        + "\n  CAST( NULL    AS BINARY(8)          ) AS mdrOptBINARY_8,       "
+        + "\n  "
+        + "\n  CAST( '2015-01-01' AS DATE          ) AS mdrReqDATE,           "
+        + "\n  CAST( NULL    AS TIME               ) AS mdrOptTIME,           "
+        + "\n  CAST( NULL    AS TIME(7)            ) AS mdrOptTIME_7,         "
+        + "\n  CAST( NULL    AS TIMESTAMP          ) AS mdrOptTIMESTAMP,      "
+        + "\n  CAST( NULL  AS INTERVAL HOUR TO SECOND(3)) AS mdrOptINTERVAL_H_S3, "
+        + "\n  CAST( NULL  AS INTERVAL YEAR(4)          ) AS mdrOptINTERVAL_Y4,  "
         + "\n  '' "
         + "\nFROM INFORMATION_SCHEMA.COLUMNS "
         + "\nLIMIT 1 " );
@@ -247,38 +249,39 @@ public class DatabaseMetaDataGetColumnsTest extends JdbcTestBase {
 
     // Set up result rows for temporary test view and Hivetest columns:
 
-    mdrOptBOOLEAN        = setUpRow( "dfs_test.tmp", VIEW_NAME, "optBOOLEAN" );
+    mdrOptBOOLEAN        = setUpRow( VIEW_SCHEMA, VIEW_NAME, "mdrOptBOOLEAN" );
+
+    mdrReqTINYINT        = setUpRow( VIEW_SCHEMA, VIEW_NAME, "mdrReqTINYINT" );
+    mdrOptSMALLINT       = setUpRow( VIEW_SCHEMA, VIEW_NAME, "mdrOptSMALLINT" );
+    mdrReqINTEGER        = setUpRow( VIEW_SCHEMA, VIEW_NAME, "mdrReqINTEGER" );
+    mdrOptBIGINT         = setUpRow( VIEW_SCHEMA, VIEW_NAME, "mdrOptBIGINT" );
 
-    mdrReqTINYINT        = setUpRow( "dfs_test.tmp", VIEW_NAME, "reqTINYINT" );
-    mdrOptSMALLINT       = setUpRow( "dfs_test.tmp", VIEW_NAME, "optSMALLINT" );
-    mdrReqINTEGER        = setUpRow( "dfs_test.tmp", VIEW_NAME, "reqINTEGER" );
-    mdrOptBIGINT         = setUpRow( "dfs_test.tmp", VIEW_NAME, "optBIGINT" );
+    mdrOptREAL           = setUpRow( VIEW_SCHEMA, VIEW_NAME, "mdrOptREAL" );
+    mdrOptFLOAT          = setUpRow( VIEW_SCHEMA, VIEW_NAME, "mdrOptFLOAT" );
+    mdrReqDOUBLE         = setUpRow( VIEW_SCHEMA, VIEW_NAME, "mdrReqDOUBLE" );
 
-    mdrOptFLOAT          = setUpRow( "dfs_test.tmp", VIEW_NAME, "optFLOAT" );
-    mdrReqDOUBLE         = setUpRow( "dfs_test.tmp", VIEW_NAME, "reqDOUBLE" );
-    mdrOptREAL           = setUpRow( "dfs_test.tmp", VIEW_NAME, "optREAL" );
+    mdrReqDECIMAL_5_3    = setUpRow( VIEW_SCHEMA, VIEW_NAME, "mdrReqDECIMAL_5_3" );
 
-    mdrReqDECIMAL_5_3    = setUpRow( "dfs_test.tmp", VIEW_NAME, "reqDECIMAL_5_3" );
+    mdrReqVARCHAR_10     = setUpRow( VIEW_SCHEMA, VIEW_NAME, "mdrReqVARCHAR_10" );
+    mdrOptVARCHAR        = setUpRow( VIEW_SCHEMA, VIEW_NAME, "mdrOptVARCHAR" );
+    mdrReqCHAR_5         = setUpRow( VIEW_SCHEMA, VIEW_NAME, "mdrReqCHAR_5" );
+    mdrOptVARBINARY_16   = setUpRow( VIEW_SCHEMA, VIEW_NAME, "mdrOptVARBINARY_16" );
+    mdrOptBINARY_1048576 = setUpRow( VIEW_SCHEMA, VIEW_NAME, "mdrOptBINARY_1048576" );
 
-    mdrReqVARCHAR_10     = setUpRow( "dfs_test.tmp", VIEW_NAME, "reqVARCHAR_10" );
-    mdrOptVARCHAR        = setUpRow( "dfs_test.tmp", VIEW_NAME, "optVARCHAR" );
-    mdrReqCHAR_5         = setUpRow( "dfs_test.tmp", VIEW_NAME, "reqCHAR_5" );
-    mdrOptVARBINARY_16   = setUpRow( "dfs_test.tmp", VIEW_NAME, "optVARBINARY_16" );
-    mdrOptBINARY_1048576 = setUpRow( "dfs_test.tmp", VIEW_NAME, "optBINARY_1048576" );
+    mdrReqDATE           = setUpRow( VIEW_SCHEMA, VIEW_NAME, "mdrReqDATE" );
+    mdrOptTIME           = setUpRow( VIEW_SCHEMA, VIEW_NAME, "mdrOptTIME" );
+    mdrOptTIME_7         = setUpRow( VIEW_SCHEMA, VIEW_NAME, "mdrOptTIME_7" );
+    mdrOptTIMESTAMP      = setUpRow( VIEW_SCHEMA, VIEW_NAME, "mdrOptTIMESTAMP" );
 
-    mdrReqDATE           = setUpRow( "dfs_test.tmp", VIEW_NAME, "reqDATE" );
-    mdrOptTIME           = setUpRow( "dfs_test.tmp", VIEW_NAME, "optTIME" );
-    mdrOptTIME_7         = setUpRow( "dfs_test.tmp", VIEW_NAME, "optTIME_7" );
-    mdrOptTIMESTAMP      = setUpRow( "dfs_test.tmp", VIEW_NAME, "optTIMESTAMP" );
-    mdrOptINTERVAL_H_S3  = setUpRow( "dfs_test.tmp", VIEW_NAME, "optINTERVAL_H_S3" );
-    mdrOptINTERVAL_Y4    = setUpRow( "dfs_test.tmp", VIEW_NAME, "optINTERVAL_Y4" );
+    mdrOptINTERVAL_H_S3  = setUpRow( VIEW_SCHEMA, VIEW_NAME, "mdrOptINTERVAL_H_S3" );
+    mdrOptINTERVAL_Y4    = setUpRow( VIEW_SCHEMA, VIEW_NAME, "mdrOptINTERVAL_Y4" );
 
-    /* TODO(start): Uncomment this block once we have a test plugin which supports all the needed types.
+    /* TODO(DRILL-3253)(start): Update this once we have test plugin supporting all needed types.
     mdrReqARRAY   = setUpRow( "hive_test.default", "infoschematest", "listtype" );
     mdrReqMAP     = setUpRow( "hive_test.default", "infoschematest", "maptype" );
-    testRowSTRUCT = setUpRow( "hive_test.default", "infoschematest", "structtype" );
-    testRowUnion  = setUpRow( "hive_test.default", "infoschematest", "uniontypetype" );
-    TODO(end) */
+    mdrUnkSTRUCT = setUpRow( "hive_test.default", "infoschematest", "structtype" );
+    mdrUnkUnion  = setUpRow( "hive_test.default", "infoschematest", "uniontypetype" );
+    TODO(DRILL-3253)(end) */
 
     // Set up getColumns(...)) result set' metadata:
 
@@ -296,13 +299,18 @@ public class DatabaseMetaDataGetColumnsTest extends JdbcTestBase {
     final ResultSet util =
         connection.createStatement().executeQuery( "DROP VIEW " + VIEW_NAME + "" );
     assertTrue( util.next() );
-    // DRILL-2439:  assertTrue( ..., util.getBoolean( 1 ) );
-    assertTrue("Error dropping temporary test-columns view " + VIEW_NAME + ": "
-         + util.getString( 2 ), util.getBoolean( 1 ) );
+    assertTrue( "Error dropping temporary test-columns view " + VIEW_NAME + ": "
+                + util.getString( 2 ), util.getBoolean( 1 ) );
     connection.close();
   }
 
 
+  private Integer getIntOrNull( ResultSet row, String columnName ) throws SQLException {
+    final int value = row.getInt( columnName );
+    return row.wasNull() ? null : new Integer( value );
+  }
+
+
   //////////////////////////////////////////////////////////////////////
   // Tests:
 
@@ -328,7 +336,7 @@ public class DatabaseMetaDataGetColumnsTest extends JdbcTestBase {
   }
 
   @Test
-  public void test_TABLE_CAT_hasRightValue_optBOOLEAN() throws SQLException {
+  public void test_TABLE_CAT_hasRightValue_mdrOptBOOLEAN() throws SQLException {
     assertThat( mdrOptBOOLEAN.getString( "TABLE_CAT" ), equalTo( "DRILL" ) );
   }
 
@@ -353,13 +361,14 @@ public class DatabaseMetaDataGetColumnsTest extends JdbcTestBase {
   @Test
   public void test_TABLE_CAT_hasRightClass() throws SQLException {
     // TODO:  Confirm that this "java.lang.String" is correct:
-    assertThat( rowsMetadata.getColumnClassName( 1 ), equalTo( String.class.getName() ) );
+    assertThat( rowsMetadata.getColumnClassName( 1 ),
+                equalTo( String.class.getName() ) );
   }
 
   // (See to-do note near top of file about reviewing nullability.)
   @Test
   public void test_TABLE_CAT_hasRightNullability() throws SQLException {
-    assertThat( "ResultSetMetaData.column...Null... nullability code",
+    assertThat( "ResultSetMetaData.column...Null... nullability code:",
                 rowsMetadata.isNullable( 1 ), equalTo( columnNullable ) );
   }
 
@@ -376,16 +385,17 @@ public class DatabaseMetaDataGetColumnsTest extends JdbcTestBase {
   }
 
   @Test
-  public void test_TABLE_SCHEM_hasRightValue_optBOOLEAN() throws SQLException {
-    assertThat( mdrOptBOOLEAN.getString( "TABLE_SCHEM" ), equalTo( "dfs_test.tmp" ) );
+  public void test_TABLE_SCHEM_hasRightValue_mdrOptBOOLEAN() throws SQLException {
+    assertThat( mdrOptBOOLEAN.getString( "TABLE_SCHEM" ), equalTo( VIEW_SCHEMA ) );
   }
 
   // Not bothering with other _local_view_ test columns for TABLE_SCHEM.
 
   @Test
-  @Ignore("Enable once we have a test plugin which supports all the needed types.")
+  @Ignore( "until we have test plugin supporting all needed types (DRILL-3253)." )
   public void test_TABLE_SCHEM_hasRightValue_tdbARRAY() throws SQLException {
-    assertThat( mdrReqARRAY.getString( "TABLE_SCHEM" ), equalTo( "hive_test.default" ) );
+    assertThat( mdrReqARRAY.getString( "TABLE_SCHEM" ),
+                equalTo( "hive_test.default" ) );
   }
 
   // Not bothering with other Hive test columns for TABLE_SCHEM.
@@ -409,7 +419,8 @@ public class DatabaseMetaDataGetColumnsTest extends JdbcTestBase {
   @Test
   public void test_TABLE_SCHEM_hasRightClass() throws SQLException {
     // TODO:  Confirm that this "java.lang.String" is correct:
-    assertThat( rowsMetadata.getColumnClassName( 2 ), equalTo( String.class.getName() ) );
+    assertThat( rowsMetadata.getColumnClassName( 2 ),
+                equalTo( String.class.getName() ) );
   }
 
   @Ignore( "until resolved:  any requirement on nullability (DRILL-2420?)" )
@@ -417,7 +428,7 @@ public class DatabaseMetaDataGetColumnsTest extends JdbcTestBase {
   public void test_TABLE_SCHEM_hasRightNullability() throws SQLException {
     // To-do:  CHECK:  Why columnNullable, when seemingly known nullable?
     // (Why not like TABLE_CAT, which does have columnNoNulls?)
-    assertThat( "ResultSetMetaData.column...Null... nullability code",
+    assertThat( "ResultSetMetaData.column...Null... nullability code:",
                 rowsMetadata.isNullable( 2 ), equalTo( columnNoNulls ) );
   }
 
@@ -434,7 +445,7 @@ public class DatabaseMetaDataGetColumnsTest extends JdbcTestBase {
   }
 
   @Test
-  public void test_TABLE_NAME_hasRightValue_optBOOLEAN() throws SQLException {
+  public void test_TABLE_NAME_hasRightValue_mdrOptBOOLEAN() throws SQLException {
     assertThat( mdrOptBOOLEAN.getString( "TABLE_NAME" ), equalTo( VIEW_NAME ) );
   }
 
@@ -459,7 +470,8 @@ public class DatabaseMetaDataGetColumnsTest extends JdbcTestBase {
   @Test
   public void test_TABLE_NAME_hasRightClass() throws SQLException {
     // TODO:  Confirm that this "java.lang.String" is correct:
-    assertThat( rowsMetadata.getColumnClassName( 3 ), equalTo( String.class.getName() ) );
+    assertThat( rowsMetadata.getColumnClassName( 3 ),
+                equalTo( String.class.getName() ) );
   }
 
   @Ignore( "until resolved:  any requirement on nullability (DRILL-2420?)" )
@@ -467,7 +479,7 @@ public class DatabaseMetaDataGetColumnsTest extends JdbcTestBase {
   public void test_TABLE_NAME_hasRightNullability() throws SQLException {
     // To-do:  CHECK:  Why columnNullable, when seemingly known nullable?
     // (Why not like TABLE_CAT, which does have columnNoNulls?)
-    assertThat( "ResultSetMetaData.column...Null... nullability code",
+    assertThat( "ResultSetMetaData.column...Null... nullability code:",
                 rowsMetadata.isNullable( 3 ), equalTo( columnNoNulls ) );
   }
 
@@ -484,14 +496,14 @@ public class DatabaseMetaDataGetColumnsTest extends JdbcTestBase {
   }
 
   @Test
-  public void test_COLUMN_NAME_hasRightValue_optBOOLEAN() throws SQLException {
-    assertThat( mdrOptBOOLEAN.getString( "COLUMN_NAME" ), equalTo( "optBOOLEAN" ) );
+  public void test_COLUMN_NAME_hasRightValue_mdrOptBOOLEAN() throws SQLException {
+    assertThat( mdrOptBOOLEAN.getString( "COLUMN_NAME" ), equalTo( "mdrOptBOOLEAN" ) );
   }
 
   // Not bothering with other _local_view_ test columns for TABLE_SCHEM.
 
   @Test
-  @Ignore("Enable once we have a test plugin which supports all the needed types.")
+  @Ignore( "until we have test plugin supporting all needed types (DRILL-3253)." )
   public void test_COLUMN_NAME_hasRightValue_tdbARRAY() throws SQLException {
     assertThat( mdrReqARRAY.getString( "COLUMN_NAME" ), equalTo( "listtype" ) );
   }
@@ -517,7 +529,8 @@ public class DatabaseMetaDataGetColumnsTest extends JdbcTestBase {
   @Test
   public void test_COLUMN_NAME_hasRightClass() throws SQLException {
     // TODO:  Confirm that this "java.lang.String" is correct:
-    assertThat( rowsMetadata.getColumnClassName( 4 ), equalTo( String.class.getName() ) );
+    assertThat( rowsMetadata.getColumnClassName( 4 ),
+                equalTo( String.class.getName() ) );
   }
 
   @Ignore( "until resolved:  any requirement on nullability (DRILL-2420?)" )
@@ -525,7 +538,7 @@ public class DatabaseMetaDataGetColumnsTest extends JdbcTestBase {
   public void test_COLUMN_NAME_hasRightNullability() throws SQLException {
     // To-do:  CHECK:  Why columnNullable, when seemingly known nullable?
     // (Why not like TABLE_CAT, which does have columnNoNulls?)
-    assertThat( "ResultSetMetaData.column...Null... nullability code",
+    assertThat( "ResultSetMetaData.column...Null... nullability code:",
                 rowsMetadata.isNullable( 4 ), equalTo( columnNoNulls ) );
   }
 
@@ -542,141 +555,141 @@ public class DatabaseMetaDataGetColumnsTest extends JdbcTestBase {
   }
 
   @Test
-  public void test_DATA_TYPE_hasRightValue_optBOOLEAN() throws SQLException {
-    assertThat( mdrOptBOOLEAN.getInt( "DATA_TYPE" ), equalTo( Types.BOOLEAN ) );
+  public void test_DATA_TYPE_hasRightValue_mdrOptBOOLEAN() throws SQLException {
+    assertThat( getIntOrNull( mdrOptBOOLEAN, "DATA_TYPE" ), equalTo( Types.BOOLEAN ) );
   }
 
   @Test
-  public void test_DATA_TYPE_hasRightValue_reqTINYINT() throws SQLException {
-    assertThat( mdrReqTINYINT.getInt( "DATA_TYPE" ), equalTo( Types.TINYINT ) );
+  public void test_DATA_TYPE_hasRightValue_mdrReqTINYINT() throws SQLException {
+    assertThat( getIntOrNull( mdrReqTINYINT, "DATA_TYPE" ), equalTo( Types.TINYINT ) );
   }
 
   @Test
-  public void test_DATA_TYPE_hasRightValue_optSMALLINT() throws SQLException {
-    assertThat( mdrOptSMALLINT.getInt( "DATA_TYPE" ), equalTo( Types.SMALLINT ) );
+  public void test_DATA_TYPE_hasRightValue_mdrOptSMALLINT() throws SQLException {
+    assertThat( getIntOrNull( mdrOptSMALLINT, "DATA_TYPE" ), equalTo( Types.SMALLINT ) );
   }
 
   @Test
-  public void test_DATA_TYPE_hasRightValue_reqINTEGER() throws SQLException {
-    assertThat( mdrReqINTEGER.getInt( "DATA_TYPE" ), equalTo( Types.INTEGER ) );
+  public void test_DATA_TYPE_hasRightValue_mdrReqINTEGER() throws SQLException {
+    assertThat( getIntOrNull( mdrReqINTEGER, "DATA_TYPE" ), equalTo( Types.INTEGER ) );
   }
 
   @Test
-  public void test_DATA_TYPE_hasRightValue_optBIGINT() throws SQLException {
-    assertThat( mdrOptBIGINT.getInt( "DATA_TYPE" ), equalTo( Types.BIGINT ) );
+  public void test_DATA_TYPE_hasRightValue_mdrOptBIGINT() throws SQLException {
+    assertThat( getIntOrNull( mdrOptBIGINT, "DATA_TYPE" ), equalTo( Types.BIGINT ) );
   }
 
   @Test
-  public void test_DATA_TYPE_hasRightValue_optFLOAT() throws SQLException {
-    assertThat( mdrOptFLOAT.getInt( "DATA_TYPE" ), equalTo( Types.FLOAT ) );
+  public void test_DATA_TYPE_hasRightValue_mdrOptREAL() throws SQLException {
+    assertThat( getIntOrNull( mdrOptREAL, "DATA_TYPE" ), equalTo( Types.REAL ) );
   }
 
   @Test
-  public void test_DATA_TYPE_hasRightValue_reqDOUBLE() throws SQLException {
-    assertThat( mdrReqDOUBLE.getInt( "DATA_TYPE" ), equalTo( Types.DOUBLE ) );
+  public void test_DATA_TYPE_hasRightValue_mdrOptFLOAT() throws SQLException {
+    assertThat( getIntOrNull( mdrOptFLOAT, "DATA_TYPE" ), equalTo( Types.FLOAT ) );
   }
 
   @Test
-  public void test_DATA_TYPE_hasRightValue_optREAL() throws SQLException {
-    assertThat( mdrOptREAL.getInt( "DATA_TYPE" ), equalTo( Types.REAL ) );
+  public void test_DATA_TYPE_hasRightValue_mdrReqDOUBLE() throws SQLException {
+    assertThat( getIntOrNull( mdrReqDOUBLE, "DATA_TYPE" ), equalTo( Types.DOUBLE ) );
   }
 
   @Test
-  public void test_DATA_TYPE_hasRightValue_reqDECIMAL_5_3() throws SQLException {
-    assertThat( mdrReqDECIMAL_5_3.getInt( "DATA_TYPE" ), equalTo( Types.DECIMAL ) );
+  public void test_DATA_TYPE_hasRightValue_mdrReqDECIMAL_5_3() throws SQLException {
+    assertThat( getIntOrNull( mdrReqDECIMAL_5_3, "DATA_TYPE" ), equalTo( Types.DECIMAL ) );
   }
 
   @Test
-  public void test_DATA_TYPE_hasRightValue_reqVARCHAR_10() throws SQLException {
-    assertThat( mdrReqVARCHAR_10.getInt( "DATA_TYPE" ), equalTo( Types.VARCHAR ) );
+  public void test_DATA_TYPE_hasRightValue_mdrReqVARCHAR_10() throws SQLException {
+    assertThat( getIntOrNull( mdrReqVARCHAR_10, "DATA_TYPE" ), equalTo( Types.VARCHAR ) );
   }
 
   @Test
-  public void test_DATA_TYPE_hasRightValue_optVARCHAR() throws SQLException {
-    assertThat( mdrOptVARCHAR.getInt( "DATA_TYPE" ), equalTo( Types.VARCHAR ) );
+  public void test_DATA_TYPE_hasRightValue_mdrOptVARCHAR() throws SQLException {
+    assertThat( getIntOrNull( mdrOptVARCHAR, "DATA_TYPE" ), equalTo( Types.VARCHAR ) );
   }
 
   @Test
-  public void test_DATA_TYPE_hasRightValue_reqCHAR_5() throws SQLException {
-    assertThat( mdrReqCHAR_5.getInt( "DATA_TYPE" ), equalTo( Types.CHAR ) );
+  public void test_DATA_TYPE_hasRightValue_mdrReqCHAR_5() throws SQLException {
+    assertThat( getIntOrNull( mdrReqCHAR_5, "DATA_TYPE" ), equalTo( Types.CHAR ) );
   }
 
   @Test
-  public void test_DATA_TYPE_hasRightValue_optVARBINARY_16() throws SQLException {
-    assertThat( mdrOptVARBINARY_16.getInt( "DATA_TYPE" ), equalTo( Types.VARBINARY ) );
+  public void test_DATA_TYPE_hasRightValue_mdrOptVARBINARY_16() throws SQLException {
+    assertThat( getIntOrNull( mdrOptVARBINARY_16, "DATA_TYPE" ), equalTo( Types.VARBINARY ) );
   }
 
   @Test
-  public void test_DATA_TYPE_hasRightValue_optBINARY_1048576CHECK() throws SQLException {
-    assertThat( mdrOptBINARY_1048576.getInt( "DATA_TYPE" ), equalTo( Types.VARBINARY ) );
+  public void test_DATA_TYPE_hasRightValue_mdrOptBINARY_1048576CHECK() throws SQLException {
+    assertThat( getIntOrNull( mdrOptBINARY_1048576, "DATA_TYPE" ), equalTo( Types.VARBINARY ) );
   }
 
   @Test
-  public void test_DATA_TYPE_hasRightValue_reqDATE() throws SQLException {
-    assertThat( mdrReqDATE.getInt( "DATA_TYPE" ), equalTo( Types.DATE ) );
+  public void test_DATA_TYPE_hasRightValue_mdrReqDATE() throws SQLException {
+    assertThat( getIntOrNull( mdrReqDATE, "DATA_TYPE" ), equalTo( Types.DATE ) );
   }
 
   @Test
-  public void test_DATA_TYPE_hasRightValue_optTIME() throws SQLException {
-    assertThat( mdrOptTIME.getInt( "DATA_TYPE" ), equalTo( Types.TIME ) );
+  public void test_DATA_TYPE_hasRightValue_mdrOptTIME() throws SQLException {
+    assertThat( getIntOrNull( mdrOptTIME, "DATA_TYPE" ), equalTo( Types.TIME ) );
   }
 
   @Test
-  public void test_DATA_TYPE_hasRightValue_optTIME_7() throws SQLException {
-    assertThat( mdrOptTIME_7.getInt( "DATA_TYPE" ), equalTo( Types.TIME ) );
+  public void test_DATA_TYPE_hasRightValue_mdrOptTIME_7() throws SQLException {
+    assertThat( getIntOrNull( mdrOptTIME_7, "DATA_TYPE" ), equalTo( Types.TIME ) );
   }
 
   @Test
-  public void test_DATA_TYPE_hasRightValue_optTIMESTAMP() throws SQLException {
-    assertThat( mdrOptTIMESTAMP.getInt( "DATA_TYPE" ), equalTo( Types.TIMESTAMP ) );
+  public void test_DATA_TYPE_hasRightValue_mdrOptTIMESTAMP() throws SQLException {
+    assertThat( getIntOrNull( mdrOptTIMESTAMP, "DATA_TYPE" ), equalTo( Types.TIMESTAMP ) );
   }
 
   @Ignore( "until resolved:  expected value (DRILL-2420?)" )
   @Test
-  public void test_DATA_TYPE_hasRightValue_optINTERVAL_HM() throws SQLException {
-    assertThat( mdrOptINTERVAL_H_S3.getInt( "DATA_TYPE" ), equalTo( Types.OTHER ) );
+  public void test_DATA_TYPE_hasRightValue_mdrOptINTERVAL_HM() throws SQLException {
+    assertThat( getIntOrNull( mdrOptINTERVAL_H_S3, "DATA_TYPE" ), equalTo( Types.OTHER ) );
     // To-do:  Determine which.
-    assertThat( mdrOptINTERVAL_H_S3.getInt( "DATA_TYPE" ), equalTo( Types.JAVA_OBJECT ) );
+    assertThat( getIntOrNull( mdrOptINTERVAL_H_S3, "DATA_TYPE" ), equalTo( Types.JAVA_OBJECT ) );
   }
 
   @Ignore( "until resolved:  expected value (DRILL-2420?)" )
   @Test
-  public void test_DATA_TYPE_hasRightValue_optINTERVAL_Y3() throws SQLException {
-    assertThat( mdrOptINTERVAL_Y4.getInt( "DATA_TYPE" ), equalTo( Types.OTHER ) );
+  public void test_DATA_TYPE_hasRightValue_mdrOptINTERVAL_Y3() throws SQLException {
+    assertThat( getIntOrNull( mdrOptINTERVAL_Y4, "DATA_TYPE" ), equalTo( Types.OTHER ) );
     // To-do:  Determine which.
-    assertThat( mdrOptINTERVAL_Y4.getInt( "DATA_TYPE" ), equalTo( Types.JAVA_OBJECT ) );
+    assertThat( getIntOrNull( mdrOptINTERVAL_Y4, "DATA_TYPE" ), equalTo( Types.JAVA_OBJECT ) );
   }
 
   @Test
-  @Ignore("Enable once we have a test plugin which supports all the needed types.")
+  @Ignore( "until we have test plugin supporting all needed types (DRILL-3253)." )
   public void test_DATA_TYPE_hasRightValue_tdbARRAY() throws SQLException {
-    assertThat( mdrReqARRAY.getInt( "DATA_TYPE" ), equalTo( Types.ARRAY ) );
+    assertThat( getIntOrNull( mdrReqARRAY, "DATA_TYPE" ), equalTo( Types.ARRAY ) );
   }
 
   @Ignore( "until resolved:  expected value (DRILL-2420?)" )
   @Test
   public void test_DATA_TYPE_hasRightValue_tbdMAP() throws SQLException {
     assertThat( "java.sql.Types.* type code",
-                mdrReqMAP.getInt( "DATA_TYPE" ), equalTo( Types.OTHER ) );
+                getIntOrNull( mdrReqMAP, "DATA_TYPE" ), equalTo( Types.OTHER ) );
     // To-do:  Determine which.
     assertThat( "java.sql.Types.* type code",
-                mdrReqMAP.getInt( "DATA_TYPE" ), equalTo( Types.JAVA_OBJECT ) );
+                getIntOrNull( mdrReqMAP, "DATA_TYPE" ), equalTo( Types.JAVA_OBJECT ) );
   }
 
   @Test
-  @Ignore("Enable once we have a test plugin which supports all the needed types.")
+  @Ignore( "until we have test plugin supporting all needed types (DRILL-3253)." )
   public void test_DATA_TYPE_hasRightValue_tbdSTRUCT() throws SQLException {
-    assertThat( testRowSTRUCT.getInt( "DATA_TYPE" ), equalTo( Types.STRUCT ) );
+    assertThat( getIntOrNull( mdrUnkSTRUCT, "DATA_TYPE" ), equalTo( Types.STRUCT ) );
   }
 
   @Ignore( "until resolved:  expected value (DRILL-2420?)" )
   @Test
   public void test_DATA_TYPE_hasRightValue_tbdUnion() throws SQLException {
     assertThat( "java.sql.Types.* type code",
-                testRowUnion.getInt( "DATA_TYPE" ), equalTo( Types.OTHER ) );
+                getIntOrNull( mdrUnkUnion, "DATA_TYPE" ), equalTo( Types.OTHER ) );
     // To-do:  Determine which.
     assertThat( "java.sql.Types.* type code",
-                testRowUnion.getInt( "DATA_TYPE" ), equalTo( Types.JAVA_OBJECT ) );
+                getIntOrNull( mdrUnkUnion, "DATA_TYPE" ), equalTo( Types.JAVA_OBJECT ) );
   }
 
   @Test
@@ -698,13 +711,14 @@ public class DatabaseMetaDataGetColumnsTest extends JdbcTestBase {
   @Test
   public void test_DATA_TYPE_hasRightClass() throws SQLException {
     // TODO:  Confirm that this "java.lang.Integer" is correct:
-    assertThat( rowsMetadata.getColumnClassName( 5 ), equalTo( Integer.class.getName() ) );
+    assertThat( rowsMetadata.getColumnClassName( 5 ),
+                equalTo( Integer.class.getName() ) );
   }
 
   // (See to-do note near top of file about reviewing nullability.)
   @Test
   public void test_DATA_TYPE_hasRightNullability() throws SQLException {
-    assertThat( "ResultSetMetaData.column...Null... nullability code",
+    assertThat( "ResultSetMetaData.column...Null... nullability code:",
                 rowsMetadata.isNullable( 5 ), equalTo( columnNoNulls ) );
   }
 
@@ -722,103 +736,103 @@ public class DatabaseMetaDataGetColumnsTest extends JdbcTestBase {
   }
 
   @Test
-  public void test_TYPE_NAME_hasRightValue_optBOOLEAN() throws SQLException {
+  public void test_TYPE_NAME_hasRightValue_mdrOptBOOLEAN() throws SQLException {
     assertThat( mdrOptBOOLEAN.getString( "TYPE_NAME" ), equalTo( "BOOLEAN" ) );
   }
 
   @Test
-  public void test_TYPE_NAME_hasRightValue_reqTINYINT() throws SQLException {
+  public void test_TYPE_NAME_hasRightValue_mdrReqTINYINT() throws SQLException {
     assertThat( mdrReqTINYINT.getString( "TYPE_NAME" ), equalTo( "TINYINT" ) );
   }
 
   @Test
-  public void test_TYPE_NAME_hasRightValue_optSMALLINT() throws SQLException {
+  public void test_TYPE_NAME_hasRightValue_mdrOptSMALLINT() throws SQLException {
     assertThat( mdrOptSMALLINT.getString( "TYPE_NAME" ), equalTo( "SMALLINT" ) );
   }
 
   @Test
-  public void test_TYPE_NAME_hasRightValue_reqINTEGER() throws SQLException {
+  public void test_TYPE_NAME_hasRightValue_mdrReqINTEGER() throws SQLException {
     assertThat( mdrReqINTEGER.getString( "TYPE_NAME" ), equalTo( "INTEGER" ) );
   }
 
   @Test
-  public void test_TYPE_NAME_hasRightValue_optBIGINT() throws SQLException {
+  public void test_TYPE_NAME_hasRightValue_mdrOptBIGINT() throws SQLException {
     assertThat( mdrOptBIGINT.getString( "TYPE_NAME" ), equalTo( "BIGINT" ) );
   }
 
   @Test
-  public void test_TYPE_NAME_hasRightValue_optFLOAT() throws SQLException {
-    assertThat( mdrOptFLOAT.getString( "TYPE_NAME" ), equalTo( "FLOAT" ) );
+  public void test_TYPE_NAME_hasRightValue_mdrOptREAL() throws SQLException {
+    assertThat( mdrOptREAL.getString( "TYPE_NAME" ), equalTo( "REAL" ) );
   }
 
   @Test
-  public void test_TYPE_NAME_hasRightValue_reqDOUBLE() throws SQLException {
-    assertThat( mdrReqDOUBLE.getString( "TYPE_NAME" ), equalTo( "DOUBLE" ) );
+  public void test_TYPE_NAME_hasRightValue_mdrOptFLOAT() throws SQLException {
+    assertThat( mdrOptFLOAT.getString( "TYPE_NAME" ), equalTo( "FLOAT" ) );
   }
 
   @Test
-  public void test_TYPE_NAME_hasRightValue_optREAL() throws SQLException {
-    assertThat( mdrOptREAL.getString( "TYPE_NAME" ), equalTo( "REAL" ) );
+  public void test_TYPE_NAME_hasRightValue_mdrReqDOUBLE() throws SQLException {
+    assertThat( mdrReqDOUBLE.getString( "TYPE_NAME" ), equalTo( "DOUBLE" ) );
   }
 
   @Test
-  public void test_TYPE_NAME_hasRightValue_reqDECIMAL_5_3() throws SQLException {
+  public void test_TYPE_NAME_hasRightValue_mdrReqDECIMAL_5_3() throws SQLException {
     assertThat( mdrReqDECIMAL_5_3.getString( "TYPE_NAME" ), equalTo( "DECIMAL" ) );
   }
 
   @Test
-  public void test_TYPE_NAME_hasRightValue_reqVARCHAR_10() throws SQLException {
+  public void test_TYPE_NAME_hasRightValue_mdrReqVARCHAR_10() throws SQLException {
     assertThat( mdrReqVARCHAR_10.getString( "TYPE_NAME" ), equalTo( "VARCHAR" ) );
   }
 
   @Test
-  public void test_TYPE_NAME_hasRightValue_optVARCHAR() throws SQLException {
+  public void test_TYPE_NAME_hasRightValue_mdrOptVARCHAR() throws SQLException {
     assertThat( mdrOptVARCHAR.getString( "TYPE_NAME" ), equalTo( "VARCHAR" ) );
   }
 
   @Test
-  public void test_TYPE_NAME_hasRightValue_reqCHAR_5() throws SQLException {
+  public void test_TYPE_NAME_hasRightValue_mdrReqCHAR_5() throws SQLException {
     assertThat( mdrReqCHAR_5.getString( "TYPE_NAME" ), equalTo( "CHAR" ) );
   }
 
   @Test
-  public void test_TYPE_NAME_hasRightValue_optVARBINARY_16() throws SQLException {
+  public void test_TYPE_NAME_hasRightValue_mdrOptVARBINARY_16() throws SQLException {
     assertThat( mdrOptVARBINARY_16.getString( "TYPE_NAME" ), equalTo( "VARBINARY" ) );
   }
 
   @Test
-  public void test_TYPE_NAME_hasRightValue_optBINARY_1048576CHECK() throws SQLException {
+  public void test_TYPE_NAME_hasRightValue_mdrOptBINARY_1048576CHECK() throws SQLException {
     assertThat( mdrOptBINARY_1048576.getString( "TYPE_NAME" ), equalTo( "VARBINARY" ) );
   }
 
   @Test
-  public void test_TYPE_NAME_hasRightValue_reqDATE() throws SQLException {
+  public void test_TYPE_NAME_hasRightValue_mdrReqDATE() throws SQLException {
     assertThat( mdrReqDATE.getString( "TYPE_NAME" ), equalTo( "DATE" ) );
   }
 
   @Test
-  public void test_TYPE_NAME_hasRightValue_optTIME() throws SQLException {
+  public void test_TYPE_NAME_hasRightValue_mdrOptTIME() throws SQLException {
     assertThat( mdrOptTIME.getString( "TYPE_NAME" ), equalTo( "TIME" ) );
   }
 
   @Test
-  public void test_TYPE_NAME_hasRightValue_optTIME_7() throws SQLException {
+  public void test_TYPE_NAME_hasRightValue_mdrOptTIME_7() throws SQLException {
     assertThat( mdrOptTIME_7.getString( "TYPE_NAME" ), equalTo( "TIME" ) );
   }
 
   @Test
-  public void test_TYPE_NAME_hasRightValue_optTIMESTAMP() throws SQLException {
+  public void test_TYPE_NAME_hasRightValue_mdrOptTIMESTAMP() throws SQLException {
     assertThat( mdrOptTIMESTAMP.getString( "TYPE_NAME" ), equalTo( "TIMESTAMP" ) );
   }
 
   @Test
-  public void test_TYPE_NAME_hasRightValue_optINTERVAL_HM() throws SQLException {
+  public void test_TYPE_NAME_hasRightValue_mdrOptINTERVAL_HM() throws SQLException {
     // (What SQL standard specifies for DATA_TYPE in INFORMATION_SCHEMA.COLUMNS:)
     assertThat( mdrOptINTERVAL_H_S3.getString( "TYPE_NAME" ), equalTo( "INTERVAL" ) );
   }
 
   @Test
-  public void test_TYPE_NAME_hasRightValue_optINTERVAL_Y3() throws SQLException {
+  public void test_TYPE_NAME_hasRightValue_mdrOptINTERVAL_Y3() throws SQLException {
     // (What SQL standard specifies for DATA_TYPE in INFORMATION_SCHEMA.COLUMNS:)
     assertThat( mdrOptINTERVAL_Y4.getString( "TYPE_NAME" ), equalTo( "INTERVAL" ) );
   }
@@ -842,16 +856,16 @@ public class DatabaseMetaDataGetColumnsTest extends JdbcTestBase {
   @Ignore( "until resolved:  expected value (DRILL-2420?)" )
   @Test
   public void test_TYPE_NAME_hasRightValue_tbdSTRUCT() throws SQLException {
-    assertThat( testRowSTRUCT.getString( "TYPE_NAME" ),
+    assertThat( mdrUnkSTRUCT.getString( "TYPE_NAME" ),
                 equalTo( "STRUCT(INTEGER sint, BOOLEAN sboolean, VARCHAR(65535) sstring)" ) ); // TODO:  Confirm.
     // TODO:  Determine which.
-    assertThat( testRowSTRUCT.getString( "TYPE_NAME" ), equalTo( "STRUCT" ) );
+    assertThat( mdrUnkSTRUCT.getString( "TYPE_NAME" ), equalTo( "STRUCT" ) );
   }
 
   @Ignore( "until resolved:  expected value (DRILL-2420?)" )
   @Test
   public void test_TYPE_NAME_hasRightValue_tbdUnion() throws SQLException {
-    assertThat( testRowUnion.getString( "TYPE_NAME" ), equalTo( "OTHER" ) );
+    assertThat( mdrUnkUnion.getString( "TYPE_NAME" ), equalTo( "OTHER" ) );
     fail( "Expected value is not resolved yet." );
   }
 
@@ -874,14 +888,15 @@ public class DatabaseMetaDataGetColumnsTest extends JdbcTestBase {
   @Test
   public void test_TYPE_NAME_hasRightClass() throws SQLException {
     // TODO:  Confirm that this "java.lang.String" is correct:
-    assertThat( rowsMetadata.getColumnClassName( 6 ), equalTo( String.class.getName() ) );
+    assertThat( rowsMetadata.getColumnClassName( 6 ),
+                equalTo( String.class.getName() ) );
   }
 
   @Ignore( "until resolved:  any requirement on nullability (DRILL-2420?)" )
   @Test
   public void test_TYPE_NAME_hasRightNullability() throws SQLException {
     // To-do:  CHECK:  Why columnNullable, when seemingly known nullable?
-    assertThat( "ResultSetMetaData.column...Null... nullability code",
+    assertThat( "ResultSetMetaData.column...Null... nullability code:",
                 rowsMetadata.isNullable( 6 ), equalTo( columnNoNulls ) );
   }
 
@@ -908,164 +923,149 @@ public class DatabaseMetaDataGetColumnsTest extends JdbcTestBase {
   }
 
   @Test
-  public void test_COLUMN_SIZE_hasRightValue_optBOOLEAN() throws SQLException {
-    final int value = mdrOptBOOLEAN.getInt( "COLUMN_SIZE" );
-    assertThat( "wasNull() [after " + value + "]",
-                mdrOptBOOLEAN.wasNull(), equalTo( true )  ); // TODO:  CONFIRM.
-    assertThat( value, equalTo( 0 /* NULL */ ) );
+  public void test_COLUMN_SIZE_hasRightValue_mdrOptBOOLEAN() throws SQLException {
+    assertThat( getIntOrNull( mdrOptBOOLEAN, "COLUMN_SIZE" ), nullValue() ); // TODO:  CONFIRM.
   }
 
   @Test
-  public void test_COLUMN_SIZE_hasRightValue_reqTINYINT() throws SQLException {
-    assertThat( mdrReqTINYINT.getInt( "COLUMN_SIZE" ), equalTo( 3 ) ); // TODO:  CONFIRM.
+  public void test_COLUMN_SIZE_hasRightValue_mdrReqTINYINT() throws SQLException {
+    assertThat( getIntOrNull( mdrReqTINYINT, "COLUMN_SIZE" ), equalTo( 3 ) ); // TODO:  CONFIRM.
   }
 
   @Test
-  public void test_COLUMN_SIZE_hasRightValue_optSMALLINT() throws SQLException {
-    assertThat( mdrOptSMALLINT.getInt( "COLUMN_SIZE" ), equalTo( 5 ) );  // TODO:  CONFIRM
+  public void test_COLUMN_SIZE_hasRightValue_mdrOptSMALLINT() throws SQLException {
+    assertThat( getIntOrNull( mdrOptSMALLINT, "COLUMN_SIZE" ), equalTo( 5 ) );  // TODO:  CONFIRM
   }
 
   @Test
-  public void test_COLUMN_SIZE_hasRightValue_reqINTEGER() throws SQLException {
-    assertThat( mdrReqINTEGER.getInt( "COLUMN_SIZE" ), equalTo( 10 ) ); // TODO:  CONFIRM.
+  public void test_COLUMN_SIZE_hasRightValue_mdrReqINTEGER() throws SQLException {
+    assertThat( getIntOrNull( mdrReqINTEGER, "COLUMN_SIZE" ), equalTo( 10 ) ); // TODO:  CONFIRM.
   }
 
   @Test
-  public void test_COLUMN_SIZE_hasRightValue_optBIGINT() throws SQLException {
-    assertThat( mdrOptBIGINT.getInt( "COLUMN_SIZE" ), equalTo( 19 ) );  // To-do:  CONFIRM.
+  public void test_COLUMN_SIZE_hasRightValue_mdrOptBIGINT() throws SQLException {
+    assertThat( getIntOrNull( mdrOptBIGINT, "COLUMN_SIZE" ), equalTo( 19 ) );  // To-do:  CONFIRM.
   }
 
   @Test
-  public void test_COLUMN_SIZE_hasRightValue_optFLOAT() throws SQLException {
-    assertThat( mdrOptFLOAT.getInt( "COLUMN_SIZE" ), equalTo( 7 ) );
+  public void test_COLUMN_SIZE_hasRightValue_mdrOptREAL() throws SQLException {
+    assertThat( getIntOrNull( mdrOptREAL, "COLUMN_SIZE" ), equalTo( 15 ) );
   }
 
   @Test
-  public void test_COLUMN_SIZE_hasRightValue_reqDOUBLE() throws SQLException {
-    assertThat( mdrReqDOUBLE.getInt( "COLUMN_SIZE" ), equalTo( 15 ) );
+  public void test_COLUMN_SIZE_hasRightValue_mdrOptFLOAT() throws SQLException {
+    assertThat( getIntOrNull( mdrOptFLOAT, "COLUMN_SIZE" ), equalTo( 7 ) );
   }
 
   @Test
-  public void test_COLUMN_SIZE_hasRightValue_optREAL() throws SQLException {
-    assertThat( mdrOptREAL.getInt( "COLUMN_SIZE" ), equalTo( 15 ) );
+  public void test_COLUMN_SIZE_hasRightValue_mdrReqDOUBLE() throws SQLException {
+    assertThat( getIntOrNull( mdrReqDOUBLE, "COLUMN_SIZE" ), equalTo( 15 ) );
   }
 
   @Test
-  public void test_COLUMN_SIZE_hasRightValue_reqDECIMAL_5_3() throws SQLException {
-    assertThat( mdrReqDECIMAL_5_3.getInt( "COLUMN_SIZE" ), equalTo( 5 ) );
+  public void test_COLUMN_SIZE_hasRightValue_mdrReqDECIMAL_5_3() throws SQLException {
+    assertThat( getIntOrNull( mdrReqDECIMAL_5_3, "COLUMN_SIZE" ), equalTo( 5 ) );
   }
 
   @Test
-  public void test_COLUMN_SIZE_hasRightValue_reqVARCHAR_10() throws SQLException {
-    assertThat( mdrReqVARCHAR_10.getInt( "COLUMN_SIZE" ), equalTo( 10 ) );
+  public void test_COLUMN_SIZE_hasRightValue_mdrReqVARCHAR_10() throws SQLException {
+    assertThat( getIntOrNull( mdrReqVARCHAR_10, "COLUMN_SIZE" ), equalTo( 10 ) );
   }
 
   @Test
-  public void test_COLUMN_SIZE_hasRightValue_optVARCHAR() throws SQLException {
-    assertThat( mdrOptVARCHAR.getInt( "COLUMN_SIZE" ), equalTo( 1 ) );
+  public void test_COLUMN_SIZE_hasRightValue_mdrOptVARCHAR() throws SQLException {
+    assertThat( getIntOrNull( mdrOptVARCHAR, "COLUMN_SIZE" ), equalTo( 1 ) );
   }
 
   @Test
-  public void test_COLUMN_SIZE_hasRightValue_reqCHAR_5() throws SQLException {
-    assertThat( mdrReqCHAR_5.getInt( "COLUMN_SIZE" ), equalTo( 5 ) );
+  public void test_COLUMN_SIZE_hasRightValue_mdrReqCHAR_5() throws SQLException {
+    assertThat( getIntOrNull( mdrReqCHAR_5, "COLUMN_SIZE" ), equalTo( 5 ) );
   }
 
   @Test
-  public void test_COLUMN_SIZE_hasRightValue_optVARBINARY_16() throws SQLException {
-    assertThat( mdrOptVARBINARY_16.getInt( "COLUMN_SIZE" ), equalTo( 16 ) );
+  public void test_COLUMN_SIZE_hasRightValue_mdrOptVARBINARY_16() throws SQLException {
+    assertThat( getIntOrNull( mdrOptVARBINARY_16, "COLUMN_SIZE" ), equalTo( 16 ) );
   }
 
   @Test
-  public void test_COLUMN_SIZE_hasRightValue_optBINARY_1048576() throws SQLException {
-    assertThat( mdrOptBINARY_1048576.getInt( "COLUMN_SIZE" ), equalTo( 1048576 ) );
+  public void test_COLUMN_SIZE_hasRightValue_mdrOptBINARY_1048576() throws SQLException {
+    assertThat( getIntOrNull( mdrOptBINARY_1048576, "COLUMN_SIZE" ), equalTo( 1048576 ) );
   }
 
   @Test
-  public void test_COLUMN_SIZE_hasRightValue_reqDATE() throws SQLException {
-    assertThat( mdrReqDATE.getInt( "COLUMN_SIZE" ), equalTo( 10 ) );
+  public void test_COLUMN_SIZE_hasRightValue_mdrReqDATE() throws SQLException {
+    assertThat( getIntOrNull( mdrReqDATE, "COLUMN_SIZE" ), equalTo( 10 ) );
   }
 
   @Test
-  public void test_COLUMN_SIZE_hasRightValue_optTIME() throws SQLException {
-    assertThat( mdrOptTIME.getInt( "COLUMN_SIZE" ),
+  public void test_COLUMN_SIZE_hasRightValue_mdrOptTIME() throws SQLException {
+    assertThat( getIntOrNull( mdrOptTIME, "COLUMN_SIZE" ),
                 equalTo( 8  /* HH:MM:SS */  ) );
   }
 
   @Ignore( "until resolved:  whether to implement TIME precision or drop test" )
   @Test
-  public void test_COLUMN_SIZE_hasRightValue_optTIME_7() throws SQLException {
-    assertThat( mdrOptTIME_7.getInt( "COLUMN_SIZE" ),
+  public void test_COLUMN_SIZE_hasRightValue_mdrOptTIME_7() throws SQLException {
+    assertThat( getIntOrNull( mdrOptTIME_7, "COLUMN_SIZE" ),
                 equalTo( 8  /* HH:MM:SS */ + 1 /* '.' */ + 7 /* sssssss */ ) );
   }
 
   @Test
-  public void test_COLUMN_SIZE_hasRightValue_optTIMESTAMP() throws SQLException {
-    assertThat( mdrOptTIMESTAMP.getInt( "COLUMN_SIZE" ),
+  public void test_COLUMN_SIZE_hasRightValue_mdrOptTIMESTAMP() throws SQLException {
+    assertThat( getIntOrNull( mdrOptTIMESTAMP, "COLUMN_SIZE" ),
                 equalTo( 19 /* YYYY-MM-DDTHH:MM:SS */  ) );
   }
 
   @Ignore( "until fixed:  INTERVAL metadata in INFORMATION_SCHEMA (DRILL-2531)" )
   @Test
-  public void test_COLUMN_SIZE_hasRightValue_optINTERVAL_HM() throws SQLException {
-    assertThat( mdrOptINTERVAL_H_S3.getInt( "COLUMN_SIZE" ),
+  public void test_COLUMN_SIZE_hasRightValue_mdrOptINTERVAL_HM() throws SQLException {
+    assertThat( getIntOrNull( mdrOptINTERVAL_H_S3, "COLUMN_SIZE" ),
                 equalTo( 14 ) );  // "P12H12M12.1234S"
   }
 
   // TODO:  When DRILL-2531 is fixed, remove this:
   @Test
-  public void test_COLUMN_SIZE_hasRightINTERIMValue_optINTERVAL_HM() throws SQLException {
-    assertThat( mdrOptINTERVAL_H_S3.getInt( "COLUMN_SIZE" ),
+  public void test_COLUMN_SIZE_hasRightINTERIMValue_mdrOptINTERVAL_HM() throws SQLException {
+    assertThat( getIntOrNull( mdrOptINTERVAL_H_S3, "COLUMN_SIZE" ),
                 equalTo( 31 ) );  // from max. form "P12..90D12H12M12.12..89S"
   }
 
   @Ignore( "until fixed:  INTERVAL metadata in INFORMATION_SCHEMA (DRILL-2531)" )
   @Test
-  public void test_COLUMN_SIZE_hasRightValue_optINTERVAL_Y3() throws SQLException {
-    assertThat( mdrOptINTERVAL_Y4.getInt( "COLUMN_SIZE" ),
+  public void test_COLUMN_SIZE_hasRightValue_mdrOptINTERVAL_Y3() throws SQLException {
+    assertThat( getIntOrNull( mdrOptINTERVAL_Y4, "COLUMN_SIZE" ),
                 equalTo( 6 ) );  // "P1234Y"
   }
 
   // TODO:  When DRILL-2531 is fixed, remove this:
   @Test
-  public void test_COLUMN_SIZE_hasRightINTERIMValue_optINTERVAL_Y3() throws SQLException {
-    assertThat( mdrOptINTERVAL_Y4.getInt( "COLUMN_SIZE" ),
+  public void test_COLUMN_SIZE_hasRightINTERIMValue_mdrOptINTERVAL_Y3() throws SQLException {
+    assertThat( getIntOrNull( mdrOptINTERVAL_Y4, "COLUMN_SIZE" ),
                 equalTo( 15 ) );  // from max. form "P12..90Y"
   }
 
   @Test
-  @Ignore("Enable once we have a test plugin which supports all the needed types.")
+  @Ignore( "until we have test plugin supporting all needed types (DRILL-3253)." )
   public void test_COLUMN_SIZE_hasRightValue_tdbARRAY() throws SQLException {
-    final int value = mdrReqARRAY.getInt( "COLUMN_SIZE" );
-    assertThat( "wasNull() [after " + value + "]",
-                mdrReqARRAY.wasNull(), equalTo( true ) ); // TODO:  Confirm.
-    assertThat( value, equalTo( 0 /* NULL */ ) );
+    assertThat( getIntOrNull( mdrReqARRAY, "COLUMN_SIZE" ), nullValue() ); // TODO:  Confirm.
   }
 
   @Test
-  @Ignore("Enable once we have a test plugin which supports all the needed types.")
+  @Ignore( "until we have test plugin supporting all needed types (DRILL-3253)." )
   public void test_COLUMN_SIZE_hasRightValue_tbdMAP() throws SQLException {
-    final int value = mdrReqMAP.getInt( "COLUMN_SIZE" );
-    assertThat( "wasNull() [after " + value + "]",
-                mdrReqMAP.wasNull(), equalTo( true ) ); // TODO:  Confirm.
-    assertThat( value, equalTo( 0 /* NULL */ ) );
+    assertThat( getIntOrNull( mdrReqMAP, "COLUMN_SIZE" ), nullValue() ); // TODO:  Confirm.
   }
 
   @Test
-  @Ignore("Enable once we have a test plugin which supports all the needed types.")
+  @Ignore( "until we have test plugin supporting all needed types (DRILL-3253)." )
   public void test_COLUMN_SIZE_hasRightValue_tbdSTRUCT() throws SQLException {
-    final int value = testRowSTRUCT.getInt( "COLUMN_SIZE" );
-    assertThat( "wasNull() [after " + value + "]",
-                testRowSTRUCT.wasNull(), equalTo( true ) ); // TODO:  Confirm.
-    assertThat( value, equalTo( 0 /* NULL */ ) );
+    assertThat( getIntOrNull( mdrUnkSTRUCT, "COLUMN_SIZE" ), nullValue() ); // TODO:  Confirm.
   }
 
   @Test
-  @Ignore("Enable once we have a test plugin which supports all the needed types.")
+  @Ignore( "until we have test plugin supporting all needed types (DRILL-3253)." )
   public void test_COLUMN_SIZE_hasRightValue_tbdUnion() throws SQLException {
-    final int value = testRowUnion.getInt( "COLUMN_SIZE" );
-    assertThat( "wasNull() [after " + value + "]",
-                testRowUnion.wasNull(), equalTo( true ) ); // TODO:  Confirm.
-    assertThat( value, equalTo( 0 /* NULL */ ) );
+    assertThat( getIntOrNull( mdrUnkUnion, "COLUMN_SIZE" ), nullValue() ); // TODO:  Confirm.
   }
 
   @Test
@@ -1087,13 +1087,14 @@ public class DatabaseMetaDataGetColumnsTest extends JdbcTestBase {
   @Test
   public void test_COLUMN_SIZE_hasRightClass() throws SQLException {
     // TODO:  Confirm that this "java.lang.Integer" is correct:
-    assertThat( rowsMetadata.getColumnClassName( 7 ), equalTo( Integer.class.getName() ) );
+    assertThat( rowsMetadata.getColumnClassName( 7 ),
+                equalTo( Integer.class.getName() ) );
   }
 
   // (See to-do note near top of file about reviewing nullability.)
   @Test
   public void test_COLUMN_SIZE_hasRightNullability() throws SQLException {
-    assertThat( "ResultSetMetaData.column...Null... nullability code",
+    assertThat( "ResultSetMetaData.column...Null... nullability code:",
                 rowsMetadata.isNullable( 7 ), equalTo( columnNullable ) );
   }
 
@@ -1133,176 +1134,131 @@ public class DatabaseMetaDataGetColumnsTest extends JdbcTestBase {
   }
 
   @Test
-  public void test_DECIMAL_DIGITS_hasRightValue_optBOOLEAN() throws SQLException {
-    final int value = mdrOptBOOLEAN.getInt( "DECIMAL_DIGITS" );
-    assertThat( "wasNull() [after " + value + "]",
-                mdrOptBOOLEAN.wasNull(), equalTo( true ) );
-    assertThat( value, equalTo( 0 /* NULL */ ) );
+  public void test_DECIMAL_DIGITS_hasRightValue_mdrOptBOOLEAN() throws SQLException {
+    assertThat( getIntOrNull( mdrOptBOOLEAN, "DECIMAL_DIGITS" ), nullValue() );
   }
 
 
   @Test
-  public void test_DECIMAL_DIGITS_hasRightValue_reqTINYINT() throws SQLException {
-    final int value = mdrReqTINYINT.getInt( "DECIMAL_DIGITS" );
-    assertThat( "wasNull() [after " + value + "]",
-                mdrReqTINYINT.wasNull(), equalTo( false ) );
-    assertThat( value, equalTo( 0 /* NULL */ ) );
+  public void test_DECIMAL_DIGITS_hasRightValue_mdrReqTINYINT() throws SQLException {
+    assertThat( getIntOrNull( mdrReqTINYINT, "DECIMAL_DIGITS" ), equalTo( 0 ) );
   }
 
   @Test
-  public void test_DECIMAL_DIGITS_hasRightValue_optSMALLINT() throws SQLException {
-    final int value = mdrOptSMALLINT.getInt( "DECIMAL_DIGITS" );
-    assertThat( "wasNull() [after " + value + "]",
-                mdrOptSMALLINT.wasNull(), equalTo( false ) );
-    assertThat( value, equalTo( 0 /* NULL */ ) );
+  public void test_DECIMAL_DIGITS_hasRightValue_mdrOptSMALLINT() throws SQLException {
+    assertThat( getIntOrNull( mdrOptSMALLINT, "DECIMAL_DIGITS" ), equalTo( 0 ) );
   }
 
   @Test
-  public void test_DECIMAL_DIGITS_hasRightValue_reqINTEGER() throws SQLException {
-    final int value = mdrReqINTEGER.getInt( "DECIMAL_DIGITS" );
-    assertThat( "wasNull() [after " + value + "]",
-                mdrReqINTEGER.wasNull(), equalTo( false ) );
-    assertThat( value, equalTo( 0 /* NULL */ ) );
+  public void test_DECIMAL_DIGITS_hasRightValue_mdrReqINTEGER() throws SQLException {
+    assertThat( getIntOrNull( mdrReqINTEGER, "DECIMAL_DIGITS" ), equalTo( 0 ) );
   }
 
   @Test
-  public void test_DECIMAL_DIGITS_hasRightValue_optBIGINT() throws SQLException {
-    final int value = mdrOptBIGINT.getInt( "DECIMAL_DIGITS" );
-    assertThat( "wasNull() [after " + value + "]",
-                mdrOptBIGINT.wasNull(), equalTo( false ) );
-    assertThat( value, equalTo( 0 /* NULL */ ) );
+  public void test_DECIMAL_DIGITS_hasRightValue_mdrOptBIGINT() throws SQLException {
+    assertThat( getIntOrNull( mdrOptBIGINT, "DECIMAL_DIGITS" ), equalTo( 0 ) );
   }
 
   @Test
-  public void test_DECIMAL_DIGITS_hasRightValue_optFLOAT() throws SQLException {
-    assertThat( mdrOptFLOAT.getInt( "DECIMAL_DIGITS" ), equalTo( 7 ) );
+  public void test_DECIMAL_DIGITS_hasRightValue_mdrOptREAL() throws SQLException {
+    assertThat( getIntOrNull( mdrOptREAL, "DECIMAL_DIGITS" ), equalTo( 15 ) );
   }
 
   @Test
-  public void test_DECIMAL_DIGITS_hasRightValue_reqDOUBLE() throws SQLException {
-    assertThat( mdrReqDOUBLE.getInt( "DECIMAL_DIGITS" ), equalTo( 15 ) );
+  public void test_DECIMAL_DIGITS_hasRightValue_mdrOptFLOAT() throws SQLException {
+    assertThat( getIntOrNull( mdrOptFLOAT, "DECIMAL_DIGITS" ), equalTo( 7 ) );
   }
 
   @Test
-  public void test_DECIMAL_DIGITS_hasRightValue_optREAL() throws SQLException {
-    assertThat( mdrOptREAL.getInt( "DECIMAL_DIGITS" ), equalTo( 15 ) );
+  public void test_DECIMAL_DIGITS_hasRightValue_mdrReqDOUBLE() throws SQLException {
+    assertThat( getIntOrNull( mdrReqDOUBLE, "DECIMAL_DIGITS" ), equalTo( 15 ) );
   }
 
   @Test
-  public void test_DECIMAL_DIGITS_hasRightValue_reqDECIMAL_5_3() throws SQLException {
-    assertThat( mdrReqDECIMAL_5_3.getInt( "DECIMAL_DIGITS" ), equalTo( 3 ) );
+  public void test_DECIMAL_DIGITS_hasRightValue_mdrReqDECIMAL_5_3() throws SQLException {
+    assertThat( getIntOrNull( mdrReqDECIMAL_5_3, "DECIMAL_DIGITS" ), equalTo( 3 ) );
   }
 
   @Test
-  public void test_DECIMAL_DIGITS_hasRightValue_reqVARCHAR_10() throws SQLException {
-    final int value = mdrReqVARCHAR_10.getInt( "DECIMAL_DIGITS" );
-    assertThat( "wasNull() [after " + value + "]",
-                mdrReqVARCHAR_10.wasNull(), equalTo( true ) );
-    assertThat( value, equalTo( 0 /* NULL */ ) );
+  public void test_DECIMAL_DIGITS_hasRightValue_mdrReqVARCHAR_10() throws SQLException {
+    assertThat( getIntOrNull( mdrReqVARCHAR_10, "DECIMAL_DIGITS" ), nullValue() );
   }
 
   @Test
-  public void test_DECIMAL_DIGITS_hasRightValue_optVARCHAR() throws SQLException {
-    final int value = mdrOptVARCHAR.getInt( "DECIMAL_DIGITS" );
-    assertThat( "wasNull() [after " + value + "]",
-                mdrOptVARCHAR.wasNull(), equalTo( true ) );
-    assertThat( value, equalTo( 0 /* NULL */ ) );
+  public void test_DECIMAL_DIGITS_hasRightValue_mdrOptVARCHAR() throws SQLException {
+    assertThat( getIntOrNull( mdrOptVARCHAR, "DECIMAL_DIGITS" ), nullValue() );
   }
 
   @Test
-  public void test_DECIMAL_DIGITS_hasRightValue_reqCHAR_5() throws SQLException {
-    final int value = mdrReqCHAR_5.getInt( "DECIMAL_DIGITS" );
-    assertThat( "wasNull() [after " + value + "]",
-                mdrReqCHAR_5.wasNull(), equalTo( true ) );
-    assertThat( value, equalTo( 0 /* NULL */ ) );
+  public void test_DECIMAL_DIGITS_hasRightValue_mdrReqCHAR_5() throws SQLException {
+    assertThat( getIntOrNull( mdrReqCHAR_5, "DECIMAL_DIGITS" ), nullValue() );
   }
 
   @Test
-  public void test_DECIMAL_DIGITS_hasRightValue_optVARBINARY_16() throws SQLException {
-    final int value = mdrOptVARBINARY_16.getInt( "DECIMAL_DIGITS" );
-    assertThat( "wasNull() [after " + value + "]",
-                mdrOptVARBINARY_16.wasNull(), equalTo( true ) );
-    assertThat( value, equalTo( 0 /* NULL */ ) );
+  public void test_DECIMAL_DIGITS_hasRightValue_mdrOptVARBINARY_16() throws SQLException {
+    assertThat( getIntOrNull( mdrOptVARBINARY_16, "DECIMAL_DIGITS" ), nullValue() );
   }
 
   @Test
-  public void test_DECIMAL_DIGITS_hasRightValue_optBINARY_1048576CHECK() throws SQLException {
-    final int value = mdrOptBINARY_1048576.getInt( "DECIMAL_DIGITS" );
-    assertThat( "wasNull() [after " + value + "]",
-                mdrOptBINARY_1048576.wasNull(), equalTo( true ) );
-    assertThat( value, equalTo( 0 /* NULL */ ) );
+  public void test_DECIMAL_DIGITS_hasRightValue_mdrOptBINARY_1048576CHECK() throws SQLException {
+    assertThat( getIntOrNull( mdrOptBINARY_1048576, "DECIMAL_DIGITS" ), nullValue() );
   }
 
   @Test
-  public void test_DECIMAL_DIGITS_hasRightValue_reqDATE() throws SQLException {
-    final int value = mdrReqDATE.getInt( "DECIMAL_DIGITS" );
-    assertThat( "wasNull() [after " + value + "]",
-                mdrReqDATE.wasNull(), equalTo( true ) );
-    assertThat( value, equalTo( 0 /* NULL */ ) );
+  public void test_DECIMAL_DIGITS_hasRightValue_mdrReqDATE() throws SQLException {
+    assertThat( getIntOrNull( mdrReqDATE, "DECIMAL_DIGITS" ), nullValue() );
   }
 
   @Test
-  public void test_DECIMAL_DIGITS_hasRightValue_optTIME() throws SQLException {
-    assertThat( mdrOptTIME.getInt( "DECIMAL_DIGITS" ), equalTo( 0 ) );
+  public void test_DECIMAL_DIGITS_hasRightValue_mdrOptTIME() throws SQLException {
+    assertThat( getIntOrNull( mdrOptTIME, "DECIMAL_DIGITS" ), nullValue() );
   }
 
   @Ignore( "until resolved:  whether to implement TIME precision or drop test" )
   @Test
-  public void test_DECIMAL_DIGITS_hasRightValue_optTIME_7() throws SQLException {
-    assertThat( mdrOptTIME_7.getInt( "DECIMAL_DIGITS" ), equalTo( 7 ) );
+  public void test_DECIMAL_DIGITS_hasRightValue_mdrOptTIME_7() throws SQLException {
+    assertThat( getIntOrNull( mdrOptTIME_7, "DECIMAL_DIGITS" ), equalTo( 7 ) );
   }
 
   @Ignore( "until resolved:  whether to implement TIME precision or drop test" )
   @Test
-  public void test_DECIMAL_DIGITS_hasRightValue_optTIMESTAMP() throws SQLException {
-    assertThat( mdrOptTIMESTAMP.getInt( "DECIMAL_DIGITS" ), equalTo( 0 ) );
+  public void test_DECIMAL_DIGITS_hasRightValue_mdrOptTIMESTAMP() throws SQLException {
+    assertThat( getIntOrNull( mdrOptTIMESTAMP, "DECIMAL_DIGITS" ), equalTo( 0 ) );
   }
 
   @Ignore( "until fixed:  INTERVAL metadata in INFORMATION_SCHEMA (DRILL-2531)" )
   @Test
-  public void test_DECIMAL_DIGITS_hasRightValue_optINTERVAL_HM() throws SQLException {
-    assertThat( mdrOptINTERVAL_H_S3.getInt( "DECIMAL_DIGITS" ), equalTo( 3 ) );
+  public void test_DECIMAL_DIGITS_hasRightValue_mdrOptINTERVAL_HM() throws SQLException {
+    assertThat( getIntOrNull( mdrOptINTERVAL_H_S3, "DECIMAL_DIGITS" ), equalTo( 3 ) );
   }
 
   @Test
-  public void test_DECIMAL_DIGITS_hasRightValue_optINTERVAL_Y3() throws SQLException {
-    assertThat( mdrOptINTERVAL_Y4.getInt( "DECIMAL_DIGITS" ), equalTo( 0 ) );
+  public void test_DECIMAL_DIGITS_hasRightValue_mdrOptINTERVAL_Y3() throws SQLException {
+    assertThat( getIntOrNull( mdrOptINTERVAL_Y4, "DECIMAL_DIGITS" ), equalTo( 0 ) );
   }
 
   @Test
-  @Ignore("Enable once we have a test plugin which supports all the needed types.")
+  @Ignore( "until we have test plugin supporting all needed types (DRILL-3253)." )
   public void test_DECIMAL_DIGITS_hasRightValue_tdbARRAY() throws SQLException {
-    final int value = mdrReqARRAY.getInt( "DECIMAL_DIGITS" );
-    assertThat( "wasNull() [after " + value + "]",
-                mdrReqARRAY.wasNull(), equalTo( true ) ); // TODO:  Confirm.
-    assertThat( value, equalTo( 0 /* NULL */ ) );
+    assertThat( getIntOrNull( mdrReqARRAY, "DECIMAL_DIGITS" ), nullValue() ); // TODO:  Confirm.
   }
 
   @Test
-  @Ignore("Enable once we have a test plugin which supports all the needed types.")
+  @Ignore( "until we have test plugin supporting all needed types (DRILL-3253)." )
   public void test_DECIMAL_DIGITS_hasRightValue_tbdMAP() throws SQLException {
-    final int value = mdrReqMAP.getInt( "DECIMAL_DIGITS" );
-    assertThat( "wasNull() [after " + value + "]",
-                mdrReqMAP.wasNull(), equalTo( true ) ); // TODO:  Confirm.
-    assertThat( value, equalTo( 0 /* NULL */ ) );
+    assertThat( getIntOrNull( mdrReqMAP, "DECIMAL_DIGITS" ), nullValue() ); // TODO:  Confirm.
   }
 
   @Test
-  @Ignore("Enable once we have a test plugin which supports all the needed types.")
+  @Ignore( "until we have test plugin supporting all needed types (DRILL-3253)." )
   public void test_DECIMAL_DIGITS_hasRightValue_tbdSTRUCT() throws SQLException {
-    final int value = testRowSTRUCT.getInt( "DECIMAL_DIGITS" );
-    assertThat( "wasNull() [after " + value + "]",
-                testRowSTRUCT.wasNull(), equalTo( true ) ); // TODO:  Confirm.
-    assertThat( value, equalTo( 0 /* NULL */ ) );
+    assertThat( getIntOrNull( mdrUnkSTRUCT, "DECIMAL_DIGITS" ), nullValue() ); // TODO:  Confirm.
   }
 
   @Test
-  @Ignore("Enable once we have a test plugin which supports all the needed types.")
+  @Ignore( "until we have test plugin supporting all needed types (DRILL-3253)." )
   public void test_DECIMAL_DIGITS_hasRightValue_tbdUnion() throws SQLException {
-    final int value = testRowUnion.getInt( "DECIMAL_DIGITS" );
-    assertThat( "wasNull() [after " + value + "]",
-                testRowUnion.wasNull(), equalTo( true ) ); // TODO:  Confirm.
-    assertThat( value, equalTo( 0 /* NULL */ ) );
+    assertThat( getIntOrNull( mdrUnkUnion, "DECIMAL_DIGITS" ), nullValue() ); // TODO:  Confirm.
   }
 
   @Test
@@ -1324,13 +1280,14 @@ public class DatabaseMetaDataGetColumnsTest extends JdbcTestBase {
   @Test
   public void test_DECIMAL_DIGITS_hasRightClass() throws SQLException {
     // TODO:  Confirm that this "java.lang.Integer" is correct:
-    assertThat( rowsMetadata.getColumnClassName( 9 ), equalTo( Integer.class.getName() ) );
+    assertThat( rowsMetadata.getColumnClassName( 9 ),
+                equalTo( Integer.class.getName() ) );
   }
 
   // (See to-do note near top of file about reviewing nullability.)
   @Test
   public void test_DECIMAL_DIGITS_hasRightNullability() throws SQLException {
-    assertThat( "ResultSetMetaData.column...Null... nullability code",
+    assertThat( "ResultSetMetaData.column...Null... nullability code:",
                 rowsMetadata.isNullable( 9 ), equalTo( columnNullable ) );
   }
 
@@ -1351,178 +1308,136 @@ public class DatabaseMetaDataGetColumnsTest extends JdbcTestBase {
   }
 
   @Test
-  public void test_NUM_PREC_RADIX_hasRightValue_optBOOLEAN() throws SQLException {
-    final int value = mdrOptBOOLEAN.getInt( "NUM_PREC_RADIX" );
-    assertThat( "wasNull() [after " + value + "]",
-                mdrOptBOOLEAN.wasNull(), equalTo( true ) );
-    assertThat( value, equalTo( 0 /* NULL */ ) );
+  public void test_NUM_PREC_RADIX_hasRightValue_mdrOptBOOLEAN() throws SQLException {
+    assertThat( getIntOrNull( mdrOptBOOLEAN, "NUM_PREC_RADIX" ), nullValue() );
   }
 
   @Test
-  public void test_NUM_PREC_RADIX_hasRightValue_reqTINYINT() throws SQLException {
-    assertThat( mdrReqTINYINT.getInt( "NUM_PREC_RADIX" ), equalTo( 10 ) );
+  public void test_NUM_PREC_RADIX_hasRightValue_mdrReqTINYINT() throws SQLException {
+    assertThat( getIntOrNull( mdrReqTINYINT, "NUM_PREC_RADIX" ), equalTo( 10 ) );
   }
 
   @Test
-  public void test_NUM_PREC_RADIX_hasRightValue_optSMALLINT() throws SQLException {
-    assertThat( mdrOptSMALLINT.getInt( "NUM_PREC_RADIX" ), equalTo( 10 ) );
+  public void test_NUM_PREC_RADIX_hasRightValue_mdrOptSMALLINT() throws SQLException {
+    assertThat( getIntOrNull( mdrOptSMALLINT, "NUM_PREC_RADIX" ), equalTo( 10 ) );
   }
 
   @Test
-  public void test_NUM_PREC_RADIX_hasRightValue_reqINTEGER() throws SQLException {
-    assertThat( mdrReqINTEGER.getInt( "NUM_PREC_RADIX" ), equalTo( 10 ) );
+  public void test_NUM_PREC_RADIX_hasRightValue_mdrReqINTEGER() throws SQLException {
+    assertThat( getIntOrNull( mdrReqINTEGER, "NUM_PREC_RADIX" ), equalTo( 10 ) );
   }
 
   @Test
-  public void test_NUM_PREC_RADIX_hasRightValue_optBIGINT() throws SQLException {
-    assertThat( mdrOptBIGINT.getInt( "NUM_PREC_RADIX" ), equalTo( 10 ) );
+  public void test_NUM_PREC_RADIX_hasRightValue_mdrOptBIGINT() throws SQLException {
+    assertThat( getIntOrNull( mdrOptBIGINT, "NUM_PREC_RADIX" ), equalTo( 10 ) );
   }
 
   @Test
-  public void test_NUM_PREC_RADIX_hasRightValue_optFLOAT() throws SQLException {
-    assertThat( mdrOptFLOAT.getInt( "NUM_PREC_RADIX" ), equalTo( 10 ) );
+  public void test_NUM_PREC_RADIX_hasRightValue_mdrOptREAL() throws SQLException {
+    assertThat( getIntOrNull( mdrOptREAL, "NUM_PREC_RADIX" ), equalTo( 10 ) );
   }
 
   @Test
-  public void test_NUM_PREC_RADIX_hasRightValue_reqDOUBLE() throws SQLException {
-    assertThat( mdrReqDOUBLE.getInt( "NUM_PREC_RADIX" ), equalTo( 10 ) );
+  public void test_NUM_PREC_RADIX_hasRightValue_mdrOptFLOAT() throws SQLException {
+    assertThat( getIntOrNull( mdrOptFLOAT, "NUM_PREC_RADIX" ), equalTo( 10 ) );
   }
 
   @Test
-  public void test_NUM_PREC_RADIX_hasRightValue_optREAL() throws SQLException {
-    assertThat( mdrOptREAL.getInt( "NUM_PREC_RADIX" ), equalTo( 10 ) );
+  public void test_NUM_PREC_RADIX_hasRightValue_mdrReqDOUBLE() throws SQLException {
+    assertThat( getIntOrNull( mdrReqDOUBLE, "NUM_PREC_RADIX" ), equalTo( 10 ) );
   }
 
   @Test
-  public void test_NUM_PREC_RADIX_hasRightValue_reqDECIMAL_5_3() throws SQLException {
-    assertThat( mdrReqDECIMAL_5_3.getInt( "NUM_PREC_RADIX" ), equalTo( 10 ) );
+  public void test_NUM_PREC_RADIX_hasRightValue_mdrReqDECIMAL_5_3() throws SQLException {
+    assertThat( getIntOrNull( mdrReqDECIMAL_5_3, "NUM_PREC_RADIX" ), equalTo( 10 ) );
   }
 
   @Test
-  public void test_NUM_PREC_RADIX_hasRightValue_reqVARCHAR_10() throws SQLException {
-    final int value = mdrReqVARCHAR_10.getInt( "NUM_PREC_RADIX" );
-    assertThat( "wasNull() [after " + value + "]",
-                mdrReqVARCHAR_10.wasNull(), equalTo( true ) );
-    assertThat( value, equalTo( 0 /* NULL */ ) );
+  public void test_NUM_PREC_RADIX_hasRightValue_mdrReqVARCHAR_10() throws SQLException {
+    assertThat( getIntOrNull( mdrReqVARCHAR_10, "NUM_PREC_RADIX" ), nullValue() );
   }
 
   @Test
-  public void test_NUM_PREC_RADIX_hasRightValue_optVARCHAR() throws SQLException {
-    final int value = mdrOptVARCHAR.getInt( "NUM_PREC_RADIX" );
-    assertThat( "wasNull() [after " + value + "]",
-                mdrOptVARCHAR.wasNull(), equalTo( true ) );
-    assertThat( value, equalTo( 0 /* NULL */ ) );
+  public void test_NUM_PREC_RADIX_hasRightValue_mdrOptVARCHAR() throws SQLException {
+    assertThat( getIntOrNull( mdrOptVARCHAR, "NUM_PREC_RADIX" ), nullValue() );
   }
 
   @Test
-  public void test_NUM_PREC_RADIX_hasRightValue_reqCHAR_5() throws SQLException {
-    final int value = mdrReqCHAR_5.getInt( "NUM_PREC_RADIX" );
-    assertThat( "wasNull() [after " + value + "]",
-                mdrReqCHAR_5.wasNull(), equalTo( true ) );
-    assertThat( value, equalTo( 0 /* NULL */ ) );
+  public void test_NUM_PREC_RADIX_hasRightValue_mdrReqCHAR_5() throws SQLException {
+    assertThat( getIntOrNull( mdrReqCHAR_5, "NUM_PREC_RADIX" ), nullValue() );
   }
 
   @Test
-  public void test_NUM_PREC_RADIX_hasRightValue_optVARBINARY_16() throws SQLException {
-    final int value = mdrOptVARBINARY_16.getInt( "NUM_PREC_RADIX" );
-    assertThat( "wasNull() [after " + value + "]",
-                mdrOptVARBINARY_16.wasNull(), equalTo( true ) );
-    assertThat( value, equalTo( 0 /* NULL */ ) );
+  public void test_NUM_PREC_RADIX_hasRightValue_mdrOptVARBINARY_16() throws SQLException {
+    assertThat( getIntOrNull( mdrOptVARBINARY_16, "NUM_PREC_RADIX" ), nullValue() );
   }
 
   @Test
-  public void test_NUM_PREC_RADIX_hasRightValue_optBINARY_1048576CHECK() throws SQLException {
-    final int value = mdrOptBINARY_1048576.getInt( "NUM_PREC_RADIX" );
-    assertThat( "wasNull() [after " + value + "]",
-                mdrOptBINARY_1048576.wasNull(), equalTo( true ) );
-    assertThat( value, equalTo( 0 /* NULL */ ) );
+  public void test_NUM_PREC_RADIX_hasRightValue_mdrOptBINARY_1048576CHECK() throws SQLException {
+    assertThat( getIntOrNull( mdrOptBINARY_1048576, "NUM_PREC_RADIX" ), nullValue() );
   }
 
   @Test
-  public void test_NUM_PREC_RADIX_hasRightValue_reqDATE() throws SQLException {
-    final int value = mdrReqDATE.getInt( "NUM_PREC_RADIX" );
-    assertThat( "wasNull() [after " + value + "]",
-                mdrReqDATE.wasNull(), equalTo( true ) );
-    assertThat( value, equalTo( 0 /* NULL */ ) );
+  public void test_NUM_PREC_RADIX_hasRightValue_mdrReqDATE() throws SQLException {
+    assertThat( getIntOrNull( mdrReqDATE, "NUM_PREC_RADIX" ), nullValue() );
   }
 
   @Ignore( "until resolved:  expected value" )
   @Test
-  public void test_NUM_PREC_RADIX_hasRightValue_optTIME() throws SQLException {
-    assertThat( mdrOptTIME.getInt( "NUM_PREC_RADIX" ), equalTo( 10 /* NULL */ ) );
+  public void test_NUM_PREC_RADIX_hasRightValue_mdrOptTIME() throws SQLException {
+    assertThat( getIntOrNull( mdrOptTIME, "NUM_PREC_RADIX" ), equalTo( 10 /* NULL */ ) );
     // To-do:  Determine which.
-    final int value = mdrOptTIME.getInt( "NUM_PREC_RADIX" );
-    assertThat( "wasNull() [after " + value + "]",
-                mdrOptTIME.wasNull(), equalTo( true ) );
-    assertThat( value, equalTo( 0 /* NULL */ ) );
+    assertThat( getIntOrNull( mdrOptTIME, "NUM_PREC_RADIX" ), nullValue() );
   }
 
   @Ignore( "until resolved:  expected value" )
   @Test
-  public void test_NUM_PREC_RADIX_hasRightValue_optTIME_7() throws SQLException {
-    assertThat( mdrOptTIME_7.getInt( "NUM_PREC_RADIX" ), equalTo( 10 ) );
+  public void test_NUM_PREC_RADIX_hasRightValue_mdrOptTIME_7() throws SQLException {
+    assertThat( getIntOrNull( mdrOptTIME_7, "NUM_PREC_RADIX" ), equalTo( 10 ) );
     // To-do:  Determine which.
-    final int value = mdrOptTIME_7.getInt( "NUM_PREC_RADIX" );
-    assertThat( "wasNull() [after " + value + "]",
-                mdrOptTIME_7.wasNull(), equalTo( true ) );
-    assertThat( value, equalTo( 0 /* NULL */ ) );
+    assertThat( getIntOrNull( mdrOptTIME_7, "NUM_PREC_RADIX" ), nullValue() );
   }
 
   @Ignore( "until resolved:  expected value" )
   @Test
-  public void test_NUM_PREC_RADIX_hasRightValue_optTIMESTAMP() throws SQLException {
-    assertThat( mdrOptTIMESTAMP.getInt( "NUM_PREC_RADIX" ), equalTo( 10 ) );
+  public void test_NUM_PREC_RADIX_hasRightValue_mdrOptTIMESTAMP() throws SQLException {
+    assertThat( getIntOrNull( mdrOptTIMESTAMP, "NUM_PREC_RADIX" ), equalTo( 10 ) );
     // To-do:  Determine which.
-    final int value = mdrOptTIMESTAMP.getInt( "NUM_PREC_RADIX" );
-    assertThat( "wasNull() [after " + value + "]",
-                 mdrOptTIMESTAMP.wasNull(), equalTo( true ) );
-    assertThat( value, equalTo( 0 /* NULL */ ) );
+    assertThat( getIntOrNull( mdrOptTIMESTAMP, "NUM_PREC_RADIX" ), nullValue() );
   }
 
   @Test
-  public void test_NUM_PREC_RADIX_hasRightValue_optINTERVAL_HM() throws SQLException {
-    assertThat( mdrOptINTERVAL_H_S3.getInt( "NUM_PREC_RADIX" ), equalTo( 10 ) );
+  public void test_NUM_PREC_RADIX_hasRightValue_mdrOptINTERVAL_HM() throws SQLException {
+    assertThat( getIntOrNull( mdrOptINTERVAL_H_S3, "NUM_PREC_RADIX" ), equalTo( 10 ) );
   }
 
   @Test
-  public void test_NUM_PREC_RADIX_hasRightValue_optINTERVAL_Y3() throws SQLException {
-    assertThat( mdrOptINTERVAL_Y4.getInt( "NUM_PREC_RADIX" ), equalTo( 10 ) );
+  public void test_NUM_PREC_RADIX_hasRightValue_mdrOptINTERVAL_Y3() throws SQLException {
+    assertThat( getIntOrNull( mdrOptINTERVAL_Y4, "NUM_PREC_RADIX" ), equalTo( 10 ) );
   }
 
   @Test
-  @Ignore("Enable once we have a test plugin which supports all the needed types.")
+  @Ignore( "until we have test plugin supporting all needed types (DRILL-3253)." )
   public void test_NUM_PREC_RADIX_hasRightValue_tdbARRAY() throws SQLException {
-    final int value = mdrReqARRAY.getInt( "NUM_PREC_RADIX" );
-    assertThat( "wasNull() [after " + value + "]",
-                mdrReqARRAY.wasNull(), equalTo( true ) ); // TODO:  Confirm.
-    assertThat( value, equalTo( 0 /* NULL */ ) );
+    assertThat( getIntOrNull( mdrReqARRAY, "NUM_PREC_RADIX" ), nullValue() ); // TODO:  Confirm.
   }
 
   @Test
-  @Ignore("Enable once we have a test plugin which supports all the needed types.")
+  @Ignore( "until we have test plugin supporting all needed types (DRILL-3253)." )
   public void test_NUM_PREC_RADIX_hasRightValue_tbdMAP() throws SQLException {
-    final int value = mdrReqMAP.getInt( "NUM_PREC_RADIX" );
-    assertThat( "wasNull() [after " + value + "]",
-                mdrReqMAP.wasNull(), equalTo( true ) ); // TODO:  Confirm.
-    assertThat( value, equalTo( 0 /* NULL */ ) );
+    assertThat( getIntOrNull( mdrReqMAP, "NUM_PREC_RADIX" ), nullValue() ); // TODO:  Confirm.
   }
 
   @Test
-  @Ignore("Enable once we have a test plugin which supports all the needed types.")
+  @Ignore( "until we have test plugin supporting all needed types (DRILL-3253)." )
   public void test_NUM_PREC_RADIX_hasRightValue_tbdSTRUCT() throws SQLException {
-    final int value = testRowSTRUCT.getInt( "NUM_PREC_RADIX" );
-    assertThat( "wasNull() [after " + value + "]",
-                testRowSTRUCT.wasNull(), equalTo( true ) ); // TODO:  Confirm.
-    assertThat( value, equalTo( 0 /* NULL */ ) );
+    assertThat( getIntOrNull( mdrUnkSTRUCT, "NUM_PREC_RADIX" ), nullValue() ); // TODO:  Confirm.
   }
 
   @Test
-  @Ignore("Enable once we have a test plugin which supports all the needed types.")
+  @Ignore( "until we have test plugin supporting all needed types (DRILL-3253)." )
   public void test_NUM_PREC_RADIX_hasRightValue_tbdUnion() throws SQLException {
-    final int value = testRowUnion.getInt( "NUM_PREC_RADIX" );
-    assertThat( "wasNull() [after " + value + "]",
-                testRowUnion.wasNull(), equalTo( true ) ); // TODO:  Confirm.
-    assertThat( value, equalTo( 0 /* NULL */ ) );
+    assertThat( getIntOrNull( mdrUnkUnion, "NUM_PREC_RADIX" ), nullValue() ); // TODO:  Confirm.
   }
 
   @Test
@@ -1544,13 +1459,14 @@ public class DatabaseMetaDataGetColumnsTest extends JdbcTestBase {
   @Test
   public void test_NUM_PREC_RADIX_hasRightClass() throws SQLException {
     // TODO:  Confirm that this "java.lang.Integer" is correct:
-    assertThat( rowsMetadata.getColumnClassName( 10 ), equalTo( Integer.class.getName() ) );
+    assertThat( rowsMetadata.getColumnClassName( 10 ),
+                equalTo( Integer.class.getName() ) );
   }
 
   // (See to-do note near top of file about reviewing nullability.)
   @Test
   public void test_NUM_PREC_RADIX_hasRightNullability() throws SQLException {
-    assertThat( "ResultSetMetaData.column...Null... nullability code",
+    assertThat( "ResultSetMetaData.column...Null... nullability code:",
                 rowsMetadata.isNullable( 10 ), equalTo( columnNullable ) );
   }
 
@@ -1572,199 +1488,199 @@ public class DatabaseMetaDataGetColumnsTest extends JdbcTestBase {
 
   // (See to-do note near top of file about reviewing nullability.)
   @Test
-  public void test_NULLABLE_hasRightValue_optBOOLEAN() throws SQLException {
+  public void test_NULLABLE_hasRightValue_mdrOptBOOLEAN() throws SQLException {
     // To-do:  CHECK:  Why columnNullableUnknown, when seemingly known nullable?
-    assertThat( "ResultSetMetaData.column...Null... nullability code",
-                mdrOptBOOLEAN.getInt( "NULLABLE" ), equalTo( columnNullable ) );
+    assertThat( "ResultSetMetaData.column...Null... nullability code:",
+                getIntOrNull( mdrOptBOOLEAN, "NULLABLE" ), equalTo( columnNullable ) );
   }
 
   // (See to-do note near top of file about reviewing nullability.)
   @Test
-  public void test_NULLABLE_hasRightValue_reqTINYINT() throws SQLException {
+  public void test_NULLABLE_hasRightValue_mdrReqTINYINT() throws SQLException {
     // To-do:  CHECK:  Why columnNullableUnknown, when seemingly known non-nullable?
-    assertThat( "ResultSetMetaData.column...Null... nullability code",
-                mdrReqTINYINT.getInt( "NULLABLE" ), equalTo( columnNoNulls ) );
+    assertThat( "ResultSetMetaData.column...Null... nullability code:",
+                getIntOrNull( mdrReqTINYINT, "NULLABLE" ), equalTo( columnNoNulls ) );
   }
 
   // (See to-do note near top of file about reviewing nullability.)
   @Test
-  public void test_NULLABLE_hasRightValue_optSMALLINT() throws SQLException {
+  public void test_NULLABLE_hasRightValue_mdrOptSMALLINT() throws SQLException {
     // To-do:  CHECK:  Why columnNullableUnknown, when seemingly known  nullable?
-    assertThat( "ResultSetMetaData.column...Null... nullability code",
-                mdrOptSMALLINT.getInt( "NULLABLE" ), equalTo( columnNullable ) );
+    assertThat( "ResultSetMetaData.column...Null... nullability code:",
+                getIntOrNull( mdrOptSMALLINT, "NULLABLE" ), equalTo( columnNullable ) );
   }
 
   // (See to-do note near top of file about reviewing nullability.)
   @Test
-  public void test_NULLABLE_hasRightValue_optBIGINT() throws SQLException {
+  public void test_NULLABLE_hasRightValue_mdrOptBIGINT() throws SQLException {
     // To-do:  CHECK:  Why columnNullableUnknown, when seemingly known  nullable?
-    assertThat( "ResultSetMetaData.column...Null... nullability code",
-                mdrOptBIGINT.getInt( "NULLABLE" ), equalTo( columnNullable ) );
+    assertThat( "ResultSetMetaData.column...Null... nullability code:",
+                getIntOrNull( mdrOptBIGINT, "NULLABLE" ), equalTo( columnNullable ) );
   }
 
   // (See to-do note near top of file about reviewing nullability.)
   @Test
-  public void test_NULLABLE_hasRightValue_optFLOAT() throws SQLException {
+  public void test_NULLABLE_hasRightValue_mdrOptREAL() throws SQLException {
     // To-do:  CHECK:  Why columnNullableUnknown, when seemingly known nullable?
-    assertThat( "ResultSetMetaData.column...Null... nullability code",
-                mdrOptFLOAT.getInt( "NULLABLE" ), equalTo( columnNullable ) );
+    assertThat( "ResultSetMetaData.column...Null... nullability code:",
+                getIntOrNull( mdrOptREAL, "NULLABLE" ), equalTo( columnNullable ) );
   }
 
   // (See to-do note near top of file about reviewing nullability.)
   @Test
-  public void test_NULLABLE_hasRightValue_reqDOUBLE() throws SQLException {
-    // To-do:  CHECK:  Why columnNullableUnknown, when seemingly known non-nullable?
-    assertThat( "ResultSetMetaData.column...Null... nullability code",
-                mdrReqDOUBLE.getInt( "NULLABLE" ), equalTo( columnNoNulls ) );
+  public void test_NULLABLE_hasRightValue_mdrOptFLOAT() throws SQLException {
+    // To-do:  CHECK:  Why columnNullableUnknown, when seemingly known nullable?
+    assertThat( "ResultSetMetaData.column...Null... nullability code:",
+                getIntOrNull( mdrOptFLOAT, "NULLABLE" ), equalTo( columnNullable ) );
   }
 
   // (See to-do note near top of file about reviewing nullability.)
   @Test
-  public void test_NULLABLE_hasRightValue_optREAL() throws SQLException {
-    // To-do:  CHECK:  Why columnNullableUnknown, when seemingly known nullable?
-    assertThat( "ResultSetMetaData.column...Null... nullability code",
-                mdrOptREAL.getInt( "NULLABLE" ), equalTo( columnNullable ) );
+  public void test_NULLABLE_hasRightValue_mdrReqDOUBLE() throws SQLException {
+    // To-do:  CHECK:  Why columnNullableUnknown, when seemingly known non-nullable?
+    assertThat( "ResultSetMetaData.column...Null... nullability code:",
+                getIntOrNull( mdrReqDOUBLE, "NULLABLE" ), equalTo( columnNoNulls ) );
   }
 
   // (See to-do note near top of file about reviewing nullability.)
   @Test
-  public void test_NULLABLE_hasRightValue_reqINTEGER() throws SQLException {
+  public void test_NULLABLE_hasRightValue_mdrReqINTEGER() throws SQLException {
     // To-do:  CHECK:  Why columnNullableUnknown, when seemingly known non-nullable?
-    assertThat( "ResultSetMetaData.column...Null... nullability code",
-                mdrReqINTEGER.getInt( "NULLABLE" ), equalTo( columnNoNulls ) );
+    assertThat( "ResultSetMetaData.column...Null... nullability code:",
+                getIntOrNull( mdrReqINTEGER, "NULLABLE" ), equalTo( columnNoNulls ) );
   }
 
   // (See to-do note near top of file about reviewing nullability.)
   @Test
-  public void test_NULLABLE_hasRightValue_reqDECIMAL_5_3() throws SQLException {
+  public void test_NULLABLE_hasRightValue_mdrReqDECIMAL_5_3() throws SQLException {
     // To-do:  CHECK:  Why columnNullableUnknown, when seemingly known non-nullable?
-    assertThat( "ResultSetMetaData.column...Null... nullability code",
-                mdrReqDECIMAL_5_3.getInt( "NULLABLE" ), equalTo( columnNoNulls ) );
+    assertThat( "ResultSetMetaData.column...Null... nullability code:",
+                getIntOrNull( mdrReqDECIMAL_5_3, "NULLABLE" ), equalTo( columnNoNulls ) );
   }
 
   // (See to-do note near top of file about reviewing nullability.)
   @Test
-  public void test_NULLABLE_hasRightValue_reqVARCHAR_10() throws SQLException {
+  public void test_NULLABLE_hasRightValue_mdrReqVARCHAR_10() throws SQLException {
     // To-do:  CHECK:  Why columnNullableUnknown, when seemingly known non-nullable?
-    assertThat( "ResultSetMetaData.column...Null... nullability code",
-                mdrReqVARCHAR_10.getInt( "NULLABLE" ), equalTo( columnNoNulls ) );
+    assertThat( "ResultSetMetaData.column...Null... nullability code:",
+                getIntOrNull( mdrReqVARCHAR_10, "NULLABLE" ), equalTo( columnNoNulls ) );
   }
 
   // (See to-do note near top of file about reviewing nullability.)
   @Test
-  public void test_NULLABLE_hasRightValue_optVARCHAR() throws SQLException {
+  public void test_NULLABLE_hasRightValue_mdrOptVARCHAR() throws SQLException {
     // To-do:  CHECK:  Why columnNullableUnknown, when seemingly known nullable?
-    assertThat( "ResultSetMetaData.column...Null... nullability code",
-                mdrOptVARCHAR.getInt( "NULLABLE" ), equalTo( columnNullable ) );
+    assertThat( "ResultSetMetaData.column...Null... nullability code:",
+                getIntOrNull( mdrOptVARCHAR, "NULLABLE" ), equalTo( columnNullable ) );
   }
 
   // (See to-do note near top of file about reviewing nullability.)
   @Test
-  public void test_NULLABLE_hasRightValue_reqCHAR_5() throws SQLException {
+  public void test_NULLABLE_hasRightValue_mdrReqCHAR_5() throws SQLException {
     // To-do:  CHECK:  Why columnNullableUnknown, when seemingly known non-nullable?
-    assertThat( "ResultSetMetaData.column...Null... nullability code",
-                mdrReqCHAR_5.getInt( "NULLABLE" ), equalTo( columnNoNulls ) );
+    assertThat( "ResultSetMetaData.column...Null... nullability code:",
+                getIntOrNull( mdrReqCHAR_5, "NULLABLE" ), equalTo( columnNoNulls ) );
   }
 
   // (See to-do note near top of file about reviewing nullability.)
   @Test
-  public void test_NULLABLE_hasRightValue_optVARBINARY_16() throws SQLException {
+  public void test_NULLABLE_hasRightValue_mdrOptVARBINARY_16() throws SQLException {
     // To-do:  CHECK:  Why columnNullableUnknown, when seemingly known nullable?
-    assertThat( "ResultSetMetaData.column...Null... nullability code",
-                mdrOptVARBINARY_16.getInt( "NULLABLE" ), equalTo( columnNullable ) );
+    assertThat( "ResultSetMetaData.column...Null... nullability code:",
+                getIntOrNull( mdrOptVARBINARY_16, "NULLABLE" ), equalTo( columnNullable ) );
   }
 
   // (See to-do note near top of file about reviewing nullability.)
   @Test
-  public void test_NULLABLE_hasRightValue_optBINARY_1048576CHECK() throws SQLException {
+  public void test_NULLABLE_hasRightValue_mdrOptBINARY_1048576CHECK() throws SQLException {
     // To-do:  CHECK:  Why columnNullableUnknown, when seemingly known nullable?
-    assertThat( "ResultSetMetaData.column...Null... nullability code",
-                mdrOptBINARY_1048576.getInt( "NULLABLE" ), equalTo( columnNullable ) );
+    assertThat( "ResultSetMetaData.column...Null... nullability code:",
+                getIntOrNull( mdrOptBINARY_1048576, "NULLABLE" ), equalTo( columnNullable ) );
   }
 
   // (See to-do note near top of file about reviewing nullability.)
   @Test
-  public void test_NULLABLE_hasRightValue_reqDATE() throws SQLException {
+  public void test_NULLABLE_hasRightValue_mdrReqDATE() throws SQLException {
     // To-do:  CHECK:  Why columnNullableUnknown, when seemingly known non-nullable?
-    assertThat( "ResultSetMetaData.column...Null... nullability code",
-                mdrReqDATE.getInt( "NULLABLE" ), equalTo( columnNoNulls ) );
+    assertThat( "ResultSetMetaData.column...Null... nullability code:",
+                getIntOrNull( mdrReqDATE, "NULLABLE" ), equalTo( columnNoNulls ) );
   }
 
   // (See to-do note near top of file about reviewing nullability.)
   @Test
-  public void test_NULLABLE_hasRightValue_optTIME() throws SQLException {
+  public void test_NULLABLE_hasRightValue_mdrOptTIME() throws SQLException {
     // To-do:  CHECK:  Why columnNullableUnknown, when seemingly known nullable?
-    assertThat( "ResultSetMetaData.column...Null... nullability code",
-                mdrOptTIME.getInt( "NULLABLE" ), equalTo( columnNullable ) );
+    assertThat( "ResultSetMetaData.column...Null... nullability code:",
+                getIntOrNull( mdrOptTIME, "NULLABLE" ), equalTo( columnNullable ) );
   }
 
   // (See to-do note near top of file about reviewing nullability.)
   @Test
-  public void test_NULLABLE_hasRightValue_optTIME_7() throws SQLException {
+  public void test_NULLABLE_hasRightValue_mdrOptTIME_7() throws SQLException {
     // To-do:  CHECK:  Why columnNullableUnknown, when seemingly known nullable?
-    assertThat( "ResultSetMetaData.column...Null... nullability code",
-                mdrOptTIME_7.getInt( "NULLABLE" ), equalTo( columnNullable ) );
+    assertThat( "ResultSetMetaData.column...Null... nullability code:",
+                getIntOrNull( mdrOptTIME_7, "NULLABLE" ), equalTo( columnNullable ) );
   }
 
   // (See to-do note near top of file about reviewing nullability.)
   @Test
-  public void test_NULLABLE_hasRightValue_optTIMESTAMP() throws SQLException {
+  public void test_NULLABLE_hasRightValue_mdrOptTIMESTAMP() throws SQLException {
     // To-do:  CHECK:  Why columnNullableUnknown, when seemingly known nullable?
-    assertThat( "ResultSetMetaData.column...Null... nullability code",
-                mdrOptTIMESTAMP.getInt( "NULLABLE" ), equalTo( columnNullable ) );
+    assertThat( "ResultSetMetaData.column...Null... nullability code:",
+                getIntOrNull( mdrOptTIMESTAMP, "NULLABLE" ), equalTo( columnNullable ) );
   }
 
   // (See to-do note near top of file about reviewing nullability.)
   @Test
-  public void test_NULLABLE_hasRightValue_optINTERVAL_HM() throws SQLException {
+  public void test_NULLABLE_hasRightValue_mdrOptINTERVAL_HM() throws SQLException {
     // To-do:  CHECK:  Why columnNullableUnknown, when seemingly known nullable?
-    assertThat( "ResultSetMetaData.column...Null... nullability code",
-                mdrOptINTERVAL_H_S3.getInt( "NULLABLE" ), equalTo( columnNullable ) );
+    assertThat( "ResultSetMetaData.column...Null... nullability code:",
+                getIntOrNull( mdrOptINTERVAL_H_S3, "NULLABLE" ), equalTo( columnNullable ) );
   }
 
   // (See to-do note near top of file about reviewing nullability.)
   @Test
-  public void test_NULLABLE_hasRightValue_optINTERVAL_Y3() throws SQLException {
+  public void test_NULLABLE_hasRightValue_mdrOptINTERVAL_Y3() throws SQLException {
     // To-do:  CHECK:  Why columnNullableUnknown, when seemingly known nullable?
-    assertThat( "ResultSetMetaData.column...Null... nullability code",
-                mdrOptINTERVAL_Y4.getInt( "NU

<TRUNCATED>

Mime
View raw message