return getSchemas(null, null);
}
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);
}
Utils.verifySuccess(schemaResp.getStatus());
return new HiveQueryResultSet.Builder(connection)
.setClient(client)
.setSessionHandle(sessHandle)
.setStmtHandle(schemaResp.getOperationHandle())
.build();
}