Package com.facebook.presto.metadata

Examples of com.facebook.presto.metadata.MetadataManager.createTable()


                ImmutableList.<ColumnMetadata>of(
                        new ColumnMetadata("a", BIGINT, 0, false),
                        new ColumnMetadata("b", BIGINT, 1, false)))));

        SchemaTableName table3 = new SchemaTableName("default", "t3");
        metadata.createTable(SESSION, "tpch", new TableMetadata("tpch", new ConnectorTableMetadata(table3,
                ImmutableList.<ColumnMetadata>of(
                        new ColumnMetadata("a", BIGINT, 0, false),
                        new ColumnMetadata("b", BIGINT, 1, false)))));

        analyzer = new Analyzer(new ConnectorSession("user", "test", "tpch", "default", UTC_KEY, Locale.ENGLISH, null, null), metadata, Optional.<QueryExplainer>absent(), true);
View Full Code Here


    {
        MetadataManager metadata = new MetadataManager();
        metadata.addConnectorMetadata("tpch", "tpch", new InMemoryMetadata());

        SchemaTableName table1 = new SchemaTableName("default", "t1");
        metadata.createTable("tpch", new TableMetadata("tpch", new ConnectorTableMetadata(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)))));
View Full Code Here

                        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("tpch", new ConnectorTableMetadata(table2,
                ImmutableList.<ColumnMetadata>of(
                        new ColumnMetadata("a", ColumnType.LONG, 0, false),
                        new ColumnMetadata("b", ColumnType.LONG, 1, false)))));

        SchemaTableName table3 = new SchemaTableName("default", "t3");
View Full Code Here

                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("tpch", new ConnectorTableMetadata(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(), true);
View Full Code Here

        metadata.addConnectorMetadata("tpch", "tpch", new TestingMetadata());
        metadata.addConnectorMetadata("c2", "c2", new TestingMetadata());
        metadata.addConnectorMetadata("c3", "c3", new TestingMetadata());

        SchemaTableName table1 = new SchemaTableName("default", "t1");
        metadata.createTable(SESSION, "tpch", new TableMetadata("tpch", new ConnectorTableMetadata(table1,
                ImmutableList.<ColumnMetadata>of(
                        new ColumnMetadata("a", BIGINT, 0, false),
                        new ColumnMetadata("b", BIGINT, 1, false),
                        new ColumnMetadata("c", BIGINT, 2, false),
                        new ColumnMetadata("d", BIGINT, 3, false)))));
View Full Code Here

                        new ColumnMetadata("b", BIGINT, 1, false),
                        new ColumnMetadata("c", BIGINT, 2, false),
                        new ColumnMetadata("d", BIGINT, 3, false)))));

        SchemaTableName table2 = new SchemaTableName("default", "t2");
        metadata.createTable(SESSION, "tpch", new TableMetadata("tpch", new ConnectorTableMetadata(table2,
                ImmutableList.<ColumnMetadata>of(
                        new ColumnMetadata("a", BIGINT, 0, false),
                        new ColumnMetadata("b", BIGINT, 1, false)))));

        SchemaTableName table3 = new SchemaTableName("default", "t3");
View Full Code Here

                ImmutableList.<ColumnMetadata>of(
                        new ColumnMetadata("a", BIGINT, 0, false),
                        new ColumnMetadata("b", BIGINT, 1, false)))));

        SchemaTableName table3 = new SchemaTableName("default", "t3");
        metadata.createTable(SESSION, "tpch", new TableMetadata("tpch", new ConnectorTableMetadata(table3,
                ImmutableList.<ColumnMetadata>of(
                        new ColumnMetadata("a", BIGINT, 0, false),
                        new ColumnMetadata("b", BIGINT, 1, false)))));

        // table in different catalog
View Full Code Here

                        new ColumnMetadata("a", BIGINT, 0, false),
                        new ColumnMetadata("b", BIGINT, 1, false)))));

        // table in different catalog
        SchemaTableName table4 = new SchemaTableName("s2", "t4");
        metadata.createTable(SESSION, "c2", new TableMetadata("tpch", new ConnectorTableMetadata(table4,
                ImmutableList.<ColumnMetadata>of(
                        new ColumnMetadata("a", BIGINT, 0, false)))));

        // valid view referencing table in same schema
        String viewData1 = JsonCodec.jsonCodec(ViewDefinition.class).toJson(
View Full Code Here

    {
        MetadataManager metadata = new MetadataManager(new FeaturesConfig().setExperimentalSyntaxEnabled(true), new TypeRegistry());
        metadata.addConnectorMetadata("tpch", "tpch", new InMemoryMetadata());

        SchemaTableName table1 = new SchemaTableName("default", "t1");
        metadata.createTable(SESSION, "tpch", new TableMetadata("tpch", new ConnectorTableMetadata(table1,
                ImmutableList.<ColumnMetadata>of(
                        new ColumnMetadata("a", BIGINT, 0, false),
                        new ColumnMetadata("b", BIGINT, 1, false),
                        new ColumnMetadata("c", BIGINT, 2, false),
                        new ColumnMetadata("d", BIGINT, 3, false)))));
View Full Code Here

                        new ColumnMetadata("b", BIGINT, 1, false),
                        new ColumnMetadata("c", BIGINT, 2, false),
                        new ColumnMetadata("d", BIGINT, 3, false)))));

        SchemaTableName table2 = new SchemaTableName("default", "t2");
        metadata.createTable(SESSION, "tpch", new TableMetadata("tpch", new ConnectorTableMetadata(table2,
                ImmutableList.<ColumnMetadata>of(
                        new ColumnMetadata("a", BIGINT, 0, false),
                        new ColumnMetadata("b", BIGINT, 1, false)))));

        SchemaTableName table3 = new SchemaTableName("default", "t3");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.