use of io.trino.testing.QueryRunner in project trino by trinodb.
the class TestUserImpersonationAccessControl method createQueryRunner.
@Override
protected QueryRunner createQueryRunner() throws Exception {
String securityConfigFile = getResource("access_control_rules.json").getPath();
SystemAccessControl accessControl = new FileBasedSystemAccessControl.Factory().create(ImmutableMap.of(SECURITY_CONFIG_FILE, securityConfigFile));
QueryRunner queryRunner = DistributedQueryRunner.builder(TEST_SESSION).setNodeCount(1).setSystemAccessControl(accessControl).build();
queryRunner.installPlugin(new TpchPlugin());
queryRunner.createCatalog("tpch", "tpch", ImmutableMap.of());
return queryRunner;
}
use of io.trino.testing.QueryRunner in project trino by trinodb.
the class AbstractTestDeltaLakeCreateTableStatistics method createQueryRunner.
@Override
protected QueryRunner createQueryRunner() throws Exception {
this.bucketName = "delta-test-create-table-statistics-" + randomTableSuffix();
DockerizedMinioDataLake dockerizedMinioDataLake = closeAfterClass(createDockerizedMinioDataLakeForDeltaLake(bucketName));
ImmutableMap.Builder<String, String> queryRunnerProperties = ImmutableMap.builder();
queryRunnerProperties.putAll(additionalProperties());
QueryRunner queryRunner = DeltaLakeQueryRunner.createS3DeltaLakeQueryRunner(DELTA_CATALOG, SCHEMA, queryRunnerProperties.buildOrThrow(), dockerizedMinioDataLake.getMinioAddress(), dockerizedMinioDataLake.getTestingHadoop());
return queryRunner;
}
use of io.trino.testing.QueryRunner in project trino by trinodb.
the class TestIcebergTaskFailureRecoveryTest method createQueryRunner.
@Override
protected QueryRunner createQueryRunner(List<TpchTable<?>> requiredTpchTables, Map<String, String> configProperties, Map<String, String> coordinatorProperties) throws Exception {
this.minioStorage = new MinioStorage("test-exchange-spooling-" + randomTableSuffix());
minioStorage.start();
return IcebergQueryRunner.builder().setInitialTables(requiredTpchTables).setCoordinatorProperties(coordinatorProperties).setExtraProperties(ImmutableMap.<String, String>builder().putAll(configProperties).put("enable-dynamic-filtering", "false").buildOrThrow()).setAdditionalSetup(runner -> {
runner.installPlugin(new FileSystemExchangePlugin());
runner.loadExchangeManager("filesystem", getExchangeManagerProperties(minioStorage));
}).build();
}
use of io.trino.testing.QueryRunner in project trino by trinodb.
the class TestDeltaLakeDelete method createQueryRunner.
@Override
protected QueryRunner createQueryRunner() throws Exception {
verify(!new ParquetWriterConfig().isParquetOptimizedWriterEnabled(), "This test assumes the optimized Parquet writer is disabled by default");
this.dockerizedMinioDataLake = closeAfterClass(createDockerizedMinioDataLakeForDeltaLake(bucketName));
QueryRunner queryRunner = DeltaLakeQueryRunner.createS3DeltaLakeQueryRunner(DELTA_CATALOG, SCHEMA, ImmutableMap.of("delta.enable-non-concurrent-writes", "true"), dockerizedMinioDataLake.getMinioAddress(), dockerizedMinioDataLake.getTestingHadoop());
TpchTable.getTables().forEach(table -> queryRunner.execute(format("CREATE TABLE %s WITH (location = '%s') AS SELECT * FROM tpch.tiny.%1$s", table.getTableName(), getLocationForTable(table.getTableName()))));
return queryRunner;
}
use of io.trino.testing.QueryRunner in project trino by trinodb.
the class TestDeltaLakeUpdate method createQueryRunner.
@Override
protected QueryRunner createQueryRunner() throws Exception {
verify(!new ParquetWriterConfig().isParquetOptimizedWriterEnabled(), "This test assumes the optimized Parquet writer is disabled by default");
DockerizedMinioDataLake dockerizedMinioDataLake = closeAfterClass(createDockerizedMinioDataLakeForDeltaLake(bucketName));
QueryRunner queryRunner = DeltaLakeQueryRunner.createS3DeltaLakeQueryRunner(DELTA_CATALOG, SCHEMA, ImmutableMap.of("delta.enable-non-concurrent-writes", "true"), dockerizedMinioDataLake.getMinioAddress(), dockerizedMinioDataLake.getTestingHadoop());
TpchTable.getTables().forEach(table -> queryRunner.execute(format("CREATE TABLE %s WITH (location = '%s') AS SELECT * FROM tpch.tiny.%1$s", table.getTableName(), getLocationForTable(table.getTableName()))));
return queryRunner;
}
Aggregations