public Table getTable(TableName tableName) throws HiveException {
    return this.getTable(ObjectUtils.firstNonNull(tableName.getDb(), SessionState.get().getCurrentDatabase()),
        tableName.getTable(), tableName.getTableMetaRef(), true);
  }
Returns metadata of the table

@param tableName
         the tableName object
@return the table
@exception HiveException
             if there's an internal error or if the table doesn't exist
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java