private void createMaterializedView(String dbName, String tableName, Set<Table> tablesUsed)
      throws TException {
    Set<SourceTable> sourceTables = new HashSet<>(tablesUsed.size());
    for (Table table : tablesUsed) {
      sourceTables.add(createSourceTable(table));
    }

    Table t = new TableBuilder()
        .setDbName(dbName)
        .setTableName(tableName)
        .setType(TableType.MATERIALIZED_VIEW.name())
        .addMaterializedViewReferencedTables(sourceTables)
        .addCol("foo", "string")
        .addCol("bar", "string")
        .create(client, conf);
  }
Creates a simple table under specified database
@param dbName    the database name that the table will be created under
@param tableName the table name to be created
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java