Search in sources :

Example 36 with TpchPlugin

use of io.trino.plugin.tpch.TpchPlugin in project trino by trinodb.

the class DeltaLakeQueryRunner method createDockerizedDeltaLakeQueryRunner.

public static DistributedQueryRunner createDockerizedDeltaLakeQueryRunner(String catalogName, String schemaName, Map<String, String> extraProperties, Map<String, String> connectorProperties, TestingHadoop testingHadoop) throws Exception {
    Session session = testSessionBuilder().setCatalog(catalogName).setSchema(schemaName).build();
    DistributedQueryRunner.Builder<?> builder = DistributedQueryRunner.builder(session);
    extraProperties.forEach(builder::addExtraProperty);
    DistributedQueryRunner queryRunner = builder.build();
    queryRunner.installPlugin(new TpchPlugin());
    queryRunner.createCatalog("tpch", "tpch");
    queryRunner.installPlugin(new TestingDeltaLakePlugin());
    Map<String, String> deltaLakeProperties = ImmutableMap.<String, String>builder().put("hive.metastore.uri", testingHadoop.getMetastoreAddress()).put("hive.s3.streaming.part-size", // must be at least 5MB according to annotations on io.trino.plugin.hive.s3.HiveS3Config.getS3StreamingPartSize
    "5MB").putAll(connectorProperties).buildOrThrow();
    queryRunner.createCatalog(catalogName, CONNECTOR_NAME, deltaLakeProperties);
    return queryRunner;
}
Also used : DistributedQueryRunner(io.trino.testing.DistributedQueryRunner) TpchPlugin(io.trino.plugin.tpch.TpchPlugin) Session(io.trino.Session)

Example 37 with TpchPlugin

use of io.trino.plugin.tpch.TpchPlugin in project trino by trinodb.

the class TestEventListenerBasic method createQueryRunner.

@Override
protected QueryRunner createQueryRunner() throws Exception {
    Session session = testSessionBuilder().setSystemProperty("task_concurrency", "1").setCatalog("tpch").setSchema("tiny").setClientInfo("{\"clientVersion\":\"testVersion\"}").build();
    DistributedQueryRunner queryRunner = DistributedQueryRunner.builder(session).setNodeCount(1).build();
    queryRunner.installPlugin(new TpchPlugin());
    queryRunner.installPlugin(new TestingEventListenerPlugin(generatedEvents));
    queryRunner.installPlugin(new ResourceGroupManagerPlugin());
    queryRunner.createCatalog("tpch", "tpch");
    queryRunner.installPlugin(new Plugin() {

        @Override
        public Iterable<ConnectorFactory> getConnectorFactories() {
            MockConnectorFactory connectorFactory = MockConnectorFactory.builder().withListTables((session, s) -> ImmutableList.of(new SchemaTableName("default", "tests_table"))).withGetColumns(schemaTableName -> ImmutableList.of(new ColumnMetadata("test_varchar", createVarcharType(15)), new ColumnMetadata("test_bigint", BIGINT))).withGetTableHandle((session, schemaTableName) -> {
                if (!schemaTableName.getTableName().startsWith("create")) {
                    return new MockConnectorTableHandle(schemaTableName);
                }
                return null;
            }).withApplyProjection((session, handle, projections, assignments) -> {
                if (((MockConnectorTableHandle) handle).getTableName().getTableName().equals("tests_table")) {
                    throw new RuntimeException("Throw from apply projection");
                }
                return Optional.empty();
            }).withGetViews((connectorSession, prefix) -> {
                ConnectorViewDefinition definition = new ConnectorViewDefinition("SELECT nationkey AS test_column FROM tpch.tiny.nation", Optional.empty(), Optional.empty(), ImmutableList.of(new ConnectorViewDefinition.ViewColumn("test_column", BIGINT.getTypeId())), Optional.empty(), Optional.empty(), true);
                SchemaTableName viewName = new SchemaTableName("default", "test_view");
                return ImmutableMap.of(viewName, definition);
            }).withGetMaterializedViews((connectorSession, prefix) -> {
                ConnectorMaterializedViewDefinition definition = new ConnectorMaterializedViewDefinition("SELECT nationkey AS test_column FROM tpch.tiny.nation", Optional.empty(), Optional.empty(), Optional.empty(), ImmutableList.of(new Column("test_column", BIGINT.getTypeId())), Optional.empty(), Optional.of("alice"), ImmutableMap.of());
                SchemaTableName materializedViewName = new SchemaTableName("default", "test_materialized_view");
                return ImmutableMap.of(materializedViewName, definition);
            }).withRowFilter(schemaTableName -> {
                if (schemaTableName.getTableName().equals("test_table_with_row_filter")) {
                    return new ViewExpression("user", Optional.of("tpch"), Optional.of("tiny"), "EXISTS (SELECT 1 FROM nation WHERE name = test_varchar)");
                }
                return null;
            }).withColumnMask((schemaTableName, columnName) -> {
                if (schemaTableName.getTableName().equals("test_table_with_column_mask") && columnName.equals("test_varchar")) {
                    return new ViewExpression("user", Optional.of("tpch"), Optional.of("tiny"), "(SELECT cast(max(orderkey) AS varchar(15)) FROM orders)");
                }
                return null;
            }).build();
            return ImmutableList.of(connectorFactory);
        }
    });
    queryRunner.createCatalog("mock", "mock", ImmutableMap.of());
    queryRunner.getCoordinator().getResourceGroupManager().get().setConfigurationManager("file", ImmutableMap.of("resource-groups.config-file", getResourceFilePath("resource_groups_config_simple.json")));
    queries = new EventsAwaitingQueries(generatedEvents, queryRunner, Duration.ofSeconds(1));
    return queryRunner;
}
Also used : TestingEventListenerPlugin(io.trino.execution.TestEventListenerPlugin.TestingEventListenerPlugin) QueryId(io.trino.spi.QueryId) MaterializedResult(io.trino.testing.MaterializedResult) URISyntaxException(java.net.URISyntaxException) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) QueryCreatedEvent(io.trino.spi.eventlistener.QueryCreatedEvent) QueryFailureInfo(io.trino.spi.eventlistener.QueryFailureInfo) Test(org.testng.annotations.Test) TableInfo(io.trino.spi.eventlistener.TableInfo) ConnectorMaterializedViewDefinition(io.trino.spi.connector.ConnectorMaterializedViewDefinition) AbstractTestQueryFramework(io.trino.testing.AbstractTestQueryFramework) DistributedQueryRunner(io.trino.testing.DistributedQueryRunner) MockConnectorFactory(io.trino.connector.MockConnectorFactory) Duration(java.time.Duration) ConnectorViewDefinition(io.trino.spi.connector.ConnectorViewDefinition) TpchPlugin(io.trino.plugin.tpch.TpchPlugin) Assert.assertFalse(org.testng.Assert.assertFalse) ImmutableSet(com.google.common.collect.ImmutableSet) TestingEventListenerPlugin(io.trino.execution.TestEventListenerPlugin.TestingEventListenerPlugin) ImmutableMap(com.google.common.collect.ImmutableMap) ViewExpression(io.trino.spi.security.ViewExpression) Set(java.util.Set) SchemaTableName(io.trino.spi.connector.SchemaTableName) Executors(java.util.concurrent.Executors) String.format(java.lang.String.format) Plugin(io.trino.spi.Plugin) Resources.getResource(com.google.common.io.Resources.getResource) List(java.util.List) TestingSession.testSessionBuilder(io.trino.testing.TestingSession.testSessionBuilder) BIGINT(io.trino.spi.type.BigintType.BIGINT) Optional(java.util.Optional) Session(io.trino.Session) QueryCompletedEvent(io.trino.spi.eventlistener.QueryCompletedEvent) DataProvider(org.testng.annotations.DataProvider) ColumnMetadata(io.trino.spi.connector.ColumnMetadata) RoutineInfo(io.trino.spi.eventlistener.RoutineInfo) Assert.assertEquals(org.testng.Assert.assertEquals) Column(io.trino.spi.connector.ConnectorMaterializedViewDefinition.Column) EventFilters(io.trino.execution.EventsCollector.EventFilters) ColumnDetail(io.trino.spi.eventlistener.ColumnDetail) ImmutableList(com.google.common.collect.ImmutableList) OutputColumnMetadata(io.trino.spi.eventlistener.OutputColumnMetadata) ImmutableSet.toImmutableSet(com.google.common.collect.ImmutableSet.toImmutableSet) ConnectorFactory(io.trino.spi.connector.ConnectorFactory) ExecutorService(java.util.concurrent.ExecutorService) QueryStatistics(io.trino.spi.eventlistener.QueryStatistics) MoreCollectors.toOptional(com.google.common.collect.MoreCollectors.toOptional) MoreExecutors.shutdownAndAwaitTermination(com.google.common.util.concurrent.MoreExecutors.shutdownAndAwaitTermination) ResourceGroupManagerPlugin(io.trino.plugin.resourcegroups.ResourceGroupManagerPlugin) Language(org.intellij.lang.annotations.Language) ColumnInfo(io.trino.spi.eventlistener.ColumnInfo) Iterables.getOnlyElement(com.google.common.collect.Iterables.getOnlyElement) File(java.io.File) MockConnectorTableHandle(io.trino.connector.MockConnectorTableHandle) UUID.randomUUID(java.util.UUID.randomUUID) TestQueues.createResourceGroupId(io.trino.execution.TestQueues.createResourceGroupId) QueryRunner(io.trino.testing.QueryRunner) Assert.assertTrue(org.testng.Assert.assertTrue) VarcharType.createVarcharType(io.trino.spi.type.VarcharType.createVarcharType) MockConnectorFactory(io.trino.connector.MockConnectorFactory) DistributedQueryRunner(io.trino.testing.DistributedQueryRunner) ColumnMetadata(io.trino.spi.connector.ColumnMetadata) OutputColumnMetadata(io.trino.spi.eventlistener.OutputColumnMetadata) TpchPlugin(io.trino.plugin.tpch.TpchPlugin) ConnectorMaterializedViewDefinition(io.trino.spi.connector.ConnectorMaterializedViewDefinition) SchemaTableName(io.trino.spi.connector.SchemaTableName) ConnectorViewDefinition(io.trino.spi.connector.ConnectorViewDefinition) ViewExpression(io.trino.spi.security.ViewExpression) Column(io.trino.spi.connector.ConnectorMaterializedViewDefinition.Column) MockConnectorTableHandle(io.trino.connector.MockConnectorTableHandle) ResourceGroupManagerPlugin(io.trino.plugin.resourcegroups.ResourceGroupManagerPlugin) Session(io.trino.Session) TpchPlugin(io.trino.plugin.tpch.TpchPlugin) TestingEventListenerPlugin(io.trino.execution.TestEventListenerPlugin.TestingEventListenerPlugin) Plugin(io.trino.spi.Plugin) ResourceGroupManagerPlugin(io.trino.plugin.resourcegroups.ResourceGroupManagerPlugin)

Example 38 with TpchPlugin

use of io.trino.plugin.tpch.TpchPlugin in project trino by trinodb.

the class TestAccessControl method createQueryRunner.

@Override
protected QueryRunner createQueryRunner() throws Exception {
    Session session = testSessionBuilder().setCatalog("blackhole").setSchema("default").build();
    DistributedQueryRunner queryRunner = DistributedQueryRunner.builder(session).setNodeCount(1).build();
    queryRunner.installPlugin(new BlackHolePlugin());
    queryRunner.createCatalog("blackhole", "blackhole");
    queryRunner.installPlugin(new TpchPlugin());
    queryRunner.createCatalog("tpch", "tpch");
    queryRunner.installPlugin(new MockConnectorPlugin(MockConnectorFactory.builder().withGetViews((connectorSession, prefix) -> {
        ConnectorViewDefinition definitionRunAsDefiner = new ConnectorViewDefinition("select 1", Optional.of("mock"), Optional.of("default"), ImmutableList.of(new ConnectorViewDefinition.ViewColumn("test", BIGINT.getTypeId())), Optional.of("comment"), Optional.of("admin"), false);
        ConnectorViewDefinition definitionRunAsInvoker = new ConnectorViewDefinition("select 1", Optional.of("mock"), Optional.of("default"), ImmutableList.of(new ConnectorViewDefinition.ViewColumn("test", BIGINT.getTypeId())), Optional.of("comment"), Optional.empty(), true);
        return ImmutableMap.of(new SchemaTableName("default", "test_view_definer"), definitionRunAsDefiner, new SchemaTableName("default", "test_view_invoker"), definitionRunAsInvoker);
    }).withListRoleGrants((connectorSession, roles, grantees, limit) -> ImmutableSet.of(new RoleGrant(new TrinoPrincipal(USER, "alice"), "alice_role", false))).build()));
    queryRunner.createCatalog("mock", "mock");
    for (String tableName : ImmutableList.of("orders", "nation", "region", "lineitem")) {
        queryRunner.execute(format("CREATE TABLE %1$s AS SELECT * FROM tpch.tiny.%1$s WITH NO DATA", tableName));
    }
    return queryRunner;
}
Also used : EXECUTE_QUERY(io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.EXECUTE_QUERY) SHOW_COLUMNS(io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.SHOW_COLUMNS) USER(io.trino.spi.security.PrincipalType.USER) Test(org.testng.annotations.Test) TRUNCATE_TABLE(io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.TRUNCATE_TABLE) CREATE_VIEW_WITH_SELECT_COLUMNS(io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.CREATE_VIEW_WITH_SELECT_COLUMNS) SHOW_CREATE_TABLE(io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.SHOW_CREATE_TABLE) BlackHolePlugin(io.trino.plugin.blackhole.BlackHolePlugin) AbstractTestQueryFramework(io.trino.testing.AbstractTestQueryFramework) Assertions(io.airlift.testing.Assertions) DELETE_TABLE(io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.DELETE_TABLE) DistributedQueryRunner(io.trino.testing.DistributedQueryRunner) MockConnectorFactory(io.trino.connector.MockConnectorFactory) TestingPrivilege(io.trino.testing.TestingAccessControlManager.TestingPrivilege) SET_TABLE_PROPERTIES(io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.SET_TABLE_PROPERTIES) ConnectorViewDefinition(io.trino.spi.connector.ConnectorViewDefinition) TpchPlugin(io.trino.plugin.tpch.TpchPlugin) CREATE_MATERIALIZED_VIEW(io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.CREATE_MATERIALIZED_VIEW) TestTable.randomTableSuffix(io.trino.testing.sql.TestTable.randomTableSuffix) INSERT_TABLE(io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.INSERT_TABLE) RENAME_COLUMN(io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.RENAME_COLUMN) ImmutableSet(com.google.common.collect.ImmutableSet) QUERY_MAX_MEMORY(io.trino.SystemSessionProperties.QUERY_MAX_MEMORY) ImmutableMap(com.google.common.collect.ImmutableMap) DROP_TABLE(io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.DROP_TABLE) SchemaTableName(io.trino.spi.connector.SchemaTableName) String.format(java.lang.String.format) SelectedRole(io.trino.spi.security.SelectedRole) DROP_COLUMN(io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.DROP_COLUMN) TestingSession.testSessionBuilder(io.trino.testing.TestingSession.testSessionBuilder) TrinoPrincipal(io.trino.spi.security.TrinoPrincipal) BIGINT(io.trino.spi.type.BigintType.BIGINT) RENAME_TABLE(io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.RENAME_TABLE) ROLE(io.trino.spi.security.SelectedRole.Type.ROLE) UPDATE_TABLE(io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.UPDATE_TABLE) TestingSession(io.trino.testing.TestingSession) Optional(java.util.Optional) CREATE_VIEW(io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.CREATE_VIEW) SET_USER(io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.SET_USER) Session(io.trino.Session) SELECT_COLUMN(io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.SELECT_COLUMN) CREATE_TABLE(io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.CREATE_TABLE) ImmutableList(com.google.common.collect.ImmutableList) Assertions.assertThatThrownBy(org.assertj.core.api.Assertions.assertThatThrownBy) Identity(io.trino.spi.security.Identity) SET_SESSION(io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.SET_SESSION) MockConnectorPlugin(io.trino.connector.MockConnectorPlugin) EXECUTE_FUNCTION(io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.EXECUTE_FUNCTION) GRANT_EXECUTE_FUNCTION(io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.GRANT_EXECUTE_FUNCTION) RoleGrant(io.trino.spi.security.RoleGrant) TestingAccessControlManager.privilege(io.trino.testing.TestingAccessControlManager.privilege) QueryRunner(io.trino.testing.QueryRunner) ADD_COLUMN(io.trino.testing.TestingAccessControlManager.TestingPrivilegeType.ADD_COLUMN) RoleGrant(io.trino.spi.security.RoleGrant) DistributedQueryRunner(io.trino.testing.DistributedQueryRunner) BlackHolePlugin(io.trino.plugin.blackhole.BlackHolePlugin) TpchPlugin(io.trino.plugin.tpch.TpchPlugin) TrinoPrincipal(io.trino.spi.security.TrinoPrincipal) MockConnectorPlugin(io.trino.connector.MockConnectorPlugin) SchemaTableName(io.trino.spi.connector.SchemaTableName) TestingSession(io.trino.testing.TestingSession) Session(io.trino.Session) ConnectorViewDefinition(io.trino.spi.connector.ConnectorViewDefinition)

Example 39 with TpchPlugin

use of io.trino.plugin.tpch.TpchPlugin in project trino by trinodb.

the class TestEventListenerWithSplits method createQueryRunner.

@Override
protected QueryRunner createQueryRunner() throws Exception {
    Session session = testSessionBuilder().setSystemProperty("task_concurrency", "1").setCatalog("tpch").setSchema("tiny").setClientInfo("{\"clientVersion\":\"testVersion\"}").build();
    DistributedQueryRunner queryRunner = DistributedQueryRunner.builder(session).setNodeCount(1).build();
    queryRunner.installPlugin(new TpchPlugin());
    queryRunner.installPlugin(new TestingEventListenerPlugin(generatedEvents));
    queryRunner.installPlugin(new ResourceGroupManagerPlugin());
    queryRunner.createCatalog("tpch", "tpch", ImmutableMap.of(TPCH_SPLITS_PER_NODE, Integer.toString(SPLITS_PER_NODE)));
    queryRunner.installPlugin(new Plugin() {

        @Override
        public Iterable<ConnectorFactory> getConnectorFactories() {
            MockConnectorFactory connectorFactory = MockConnectorFactory.builder().withListTables((session, s) -> ImmutableList.of(new SchemaTableName("default", "test_table"))).withApplyProjection((session, handle, projections, assignments) -> {
                throw new RuntimeException("Throw from apply projection");
            }).build();
            return ImmutableList.of(connectorFactory);
        }
    });
    queryRunner.createCatalog("mock", "mock", ImmutableMap.of());
    queryRunner.getCoordinator().getResourceGroupManager().get().setConfigurationManager("file", ImmutableMap.of("resource-groups.config-file", getResourceFilePath("resource_groups_config_simple.json")));
    queries = new EventsAwaitingQueries(generatedEvents, queryRunner, Duration.ofSeconds(1));
    return queryRunner;
}
Also used : TestingEventListenerPlugin(io.trino.execution.TestEventListenerPlugin.TestingEventListenerPlugin) QueryCompletedEvent(io.trino.spi.eventlistener.QueryCompletedEvent) MaterializedResult(io.trino.testing.MaterializedResult) QueryCreatedEvent(io.trino.spi.eventlistener.QueryCreatedEvent) Assert.assertEquals(org.testng.Assert.assertEquals) Test(org.testng.annotations.Test) TPCH_SPLITS_PER_NODE(io.trino.plugin.tpch.TpchConnectorFactory.TPCH_SPLITS_PER_NODE) AbstractTestQueryFramework(io.trino.testing.AbstractTestQueryFramework) DistributedQueryRunner(io.trino.testing.DistributedQueryRunner) ImmutableList(com.google.common.collect.ImmutableList) MockConnectorFactory(io.trino.connector.MockConnectorFactory) Duration(java.time.Duration) TpchPlugin(io.trino.plugin.tpch.TpchPlugin) ConnectorFactory(io.trino.spi.connector.ConnectorFactory) Assert.assertFalse(org.testng.Assert.assertFalse) Collectors.toSet(java.util.stream.Collectors.toSet) QueryStatistics(io.trino.spi.eventlistener.QueryStatistics) SplitCompletedEvent(io.trino.spi.eventlistener.SplitCompletedEvent) ImmutableSet(com.google.common.collect.ImmutableSet) TestingEventListenerPlugin(io.trino.execution.TestEventListenerPlugin.TestingEventListenerPlugin) QueryType(io.trino.spi.resourcegroups.QueryType) ImmutableMap(com.google.common.collect.ImmutableMap) ResourceGroupManagerPlugin(io.trino.plugin.resourcegroups.ResourceGroupManagerPlugin) Language(org.intellij.lang.annotations.Language) Set(java.util.Set) Iterables.getOnlyElement(com.google.common.collect.Iterables.getOnlyElement) SchemaTableName(io.trino.spi.connector.SchemaTableName) Plugin(io.trino.spi.Plugin) List(java.util.List) TestingSession.testSessionBuilder(io.trino.testing.TestingSession.testSessionBuilder) TestQueues.createResourceGroupId(io.trino.execution.TestQueues.createResourceGroupId) QueryRunner(io.trino.testing.QueryRunner) Optional(java.util.Optional) Assert.assertTrue(org.testng.Assert.assertTrue) Session(io.trino.Session) MockConnectorFactory(io.trino.connector.MockConnectorFactory) DistributedQueryRunner(io.trino.testing.DistributedQueryRunner) TpchPlugin(io.trino.plugin.tpch.TpchPlugin) SchemaTableName(io.trino.spi.connector.SchemaTableName) ResourceGroupManagerPlugin(io.trino.plugin.resourcegroups.ResourceGroupManagerPlugin) Session(io.trino.Session) TpchPlugin(io.trino.plugin.tpch.TpchPlugin) TestingEventListenerPlugin(io.trino.execution.TestEventListenerPlugin.TestingEventListenerPlugin) ResourceGroupManagerPlugin(io.trino.plugin.resourcegroups.ResourceGroupManagerPlugin) Plugin(io.trino.spi.Plugin)

Example 40 with TpchPlugin

use of io.trino.plugin.tpch.TpchPlugin in project trino by trinodb.

the class TestCoordinatorDynamicFiltering method setup.

@BeforeClass
public void setup() {
    // create lineitem table in test connector
    getQueryRunner().installPlugin(new TestPlugin());
    getQueryRunner().installPlugin(new TpchPlugin());
    getQueryRunner().installPlugin(new TpcdsPlugin());
    getQueryRunner().installPlugin(new MemoryPlugin());
    getQueryRunner().createCatalog("test", "test", ImmutableMap.of());
    getQueryRunner().createCatalog("tpch", "tpch", ImmutableMap.of());
    getQueryRunner().createCatalog("tpcds", "tpcds", ImmutableMap.of());
    getQueryRunner().createCatalog("memory", "memory", ImmutableMap.of());
    computeActual("CREATE TABLE lineitem AS SELECT * FROM tpch.tiny.lineitem");
    computeActual("CREATE TABLE customer AS SELECT * FROM tpch.tiny.customer");
    computeActual("CREATE TABLE store_sales AS SELECT * FROM tpcds.tiny.store_sales");
}
Also used : TpchPlugin(io.trino.plugin.tpch.TpchPlugin) TpcdsPlugin(io.trino.plugin.tpcds.TpcdsPlugin) MemoryPlugin(io.trino.plugin.memory.MemoryPlugin) BeforeClass(org.testng.annotations.BeforeClass)

Aggregations

TpchPlugin (io.trino.plugin.tpch.TpchPlugin)49 DistributedQueryRunner (io.trino.testing.DistributedQueryRunner)39 Session (io.trino.Session)16 BeforeClass (org.testng.annotations.BeforeClass)8 ImmutableList (com.google.common.collect.ImmutableList)7 ImmutableMap (com.google.common.collect.ImmutableMap)7 QueryRunner (io.trino.testing.QueryRunner)7 TestingSession.testSessionBuilder (io.trino.testing.TestingSession.testSessionBuilder)7 File (java.io.File)7 ImmutableSet (com.google.common.collect.ImmutableSet)6 SchemaTableName (io.trino.spi.connector.SchemaTableName)6 AbstractTestQueryFramework (io.trino.testing.AbstractTestQueryFramework)6 Optional (java.util.Optional)6 Test (org.testng.annotations.Test)6 MockConnectorFactory (io.trino.connector.MockConnectorFactory)5 Plugin (io.trino.spi.Plugin)5 Assertions.assertThatThrownBy (org.assertj.core.api.Assertions.assertThatThrownBy)4 MockConnectorTableHandle (io.trino.connector.MockConnectorTableHandle)3 BlackHolePlugin (io.trino.plugin.blackhole.BlackHolePlugin)3 BIGINT (io.trino.spi.type.BigintType.BIGINT)3