public static TableName of(Table table) throws SemanticException {
    return ofNullable(table.getTableName(), table.getDbName(), table.getSnapshotRef());
  }
Get a {@link TableName} object based on a {@link Table}. This is basically a wrapper of
{@link TableName#fromString(String, String, String)} to throw a {@link SemanticException} in case of errors.
@param table the table
@return a {@link TableName}
@throws SemanticException
ql/src/java/org/apache/hadoop/hive/ql/parse/HiveTableName.java