TGetTablesResp getTableResp;
if (schemaPattern == null) {
// if schemaPattern is null it means that the schemaPattern value should not be used to narrow the search
schemaPattern = "%";
}
TGetTablesReq getTableReq = new TGetTablesReq(sessHandle);
getTableReq.setTableName(tableNamePattern);
// TODO: need to set catalog parameter
if (types != null) {
getTableReq.setTableTypes(Arrays.asList(types));
}
if (schemaPattern != null) {
getTableReq.setSchemaName(schemaPattern);
}
try {
getTableResp = client.GetTables(getTableReq);
} catch (TException e) {