{
MetadataManager metadata = new MetadataManager();
metadata.addConnectorMetadata("tpch", new InMemoryMetadata());
SchemaTableName table1 = new SchemaTableName("default", "t1");
metadata.createTable("tpch", new TableMetadata(table1,
ImmutableList.<ColumnMetadata>of(
new ColumnMetadata("a", ColumnType.LONG, 0, false),
new ColumnMetadata("b", ColumnType.LONG, 1, false),
new ColumnMetadata("c", ColumnType.LONG, 2, false),
new ColumnMetadata("d", ColumnType.LONG, 3, false))));
SchemaTableName table2 = new SchemaTableName("default", "t2");
metadata.createTable("tpch", new TableMetadata(table2,
ImmutableList.<ColumnMetadata>of(
new ColumnMetadata("a", ColumnType.LONG, 0, false),
new ColumnMetadata("b", ColumnType.LONG, 1, false))));
SchemaTableName table3 = new SchemaTableName("default", "t3");
metadata.createTable("tpch", new TableMetadata(table3,
ImmutableList.<ColumnMetadata>of(
new ColumnMetadata("a", ColumnType.LONG, 0, false),
new ColumnMetadata("b", ColumnType.LONG, 1, false))));
analyzer = new Analyzer(new Session("user", "test", "tpch", "default", null, null), metadata, Optional.<QueryExplainer>absent());