String fullTableName = SchemaUtil.getTableName(schemaName, tableName);
List<TableRef> tableRefs = tableMap.get(fullTableName);
if (tableRefs.size() == 0) {
throw new TableNotFoundException(fullTableName);
} else if (tableRefs.size() > 1) {
throw new AmbiguousTableException(tableName);
} else {
return tableRefs.get(0);
}
}