static Double extractSqlDouble(Object obj) throws MetaException {
    if (obj == null)
      return null;
    if (!(obj instanceof Number)) {
      throw new MetaException("Expected numeric type but got " + obj.getClass().getName());
    }
    return ((Number) obj).doubleValue();
  }
Convert a boolean value returned from the RDBMS to a Java Boolean object.
MySQL has booleans, but e.g. Derby uses 'Y'/'N' mapping and Oracle DB
doesn't supports boolean, so we have used Number to store the value,
which maps to BigDecimal.

@param value
         column value from the database
@return The Boolean value of the database column value, null if the column
        value is null
@throws MetaException
          if the column value cannot be converted into a Boolean object
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetastoreDirectSqlUtils.java