@Override public List<Table> getTables(String regex) throws MetaException {
    ResultSet rs = null;
    try {
      rs = fetchTablesViaDBMetaData(regex);
      if (rs != null) {
        List<Table> tables = new ArrayList<Table>();
        while(rs.next()) {
          try {
            tables.add(getTable(rs.getString(3)));
          } catch (MetaException e) { /* IGNORE */ }
        }
        return tables;
      }
    } catch (SQLException sqle) {
      LOG.warn("Could not retrieve tables from remote datasource, cause: {}", sqle.getMessage());
      throw new MetaException("Error retrieving remote table:" + sqle);
    } finally {
      try {
        if (rs != null) {
          rs.close();
          rs = null;
        }
      } catch(Exception e) { /* ignore */}
    }
    return null;
  }
Returns Hive Table objects from the remote database for tables that match a name pattern.
@return List A collection of objects that match the name pattern, null otherwise.
@throws MetaException To indicate any failures with executing this API
@param regex
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/dataconnector/jdbc/AbstractJDBCConnectorProvider.java