public ResultSet getSchemas(String catalog, String schemaPattern)
throws SQLException {
TGetSchemasResp schemaResp;
TGetSchemasReq schemaReq = new TGetSchemasReq();
schemaReq.setSessionHandle(sessHandle);
if (catalog != null) {
schemaReq.setCatalogName(catalog);
}
if (schemaPattern == null) {
schemaPattern = "%";
}
schemaReq.setSchemaName(schemaPattern);
try {
schemaResp = client.GetSchemas(schemaReq);
} catch (TException e) {
throw new SQLException(e.getMessage(), "08S01", e);