Search in sources :

Example 1 with ColumnPropertyManager

use of com.facebook.presto.metadata.ColumnPropertyManager in project presto by prestodb.

the class TestCreateMaterializedViewTask method setUp.

@BeforeMethod
public void setUp() {
    CatalogManager catalogManager = new CatalogManager();
    Catalog testCatalog = createBogusTestingCatalog(CATALOG_NAME);
    catalogManager.registerCatalog(testCatalog);
    TablePropertyManager tablePropertyManager = new TablePropertyManager();
    tablePropertyManager.addProperties(testCatalog.getConnectorId(), ImmutableList.of(stringProperty("baz", "test property", null, false)));
    ColumnPropertyManager columnPropertyManager = new ColumnPropertyManager();
    columnPropertyManager.addProperties(testCatalog.getConnectorId(), ImmutableList.of());
    FunctionAndTypeManager functionAndTypeManager = createTestFunctionAndTypeManager();
    transactionManager = createTestTransactionManager(catalogManager);
    testSession = testSessionBuilder().setTransactionId(transactionManager.beginTransaction(false)).build();
    accessControl = new AllowAllAccessControl();
    executorService = newCachedThreadPool(daemonThreadsNamed("test-%s"));
    metadata = new MockMetadata(functionAndTypeManager, tablePropertyManager, columnPropertyManager, testCatalog.getConnectorId());
}
Also used : ColumnPropertyManager(com.facebook.presto.metadata.ColumnPropertyManager) FunctionAndTypeManager(com.facebook.presto.metadata.FunctionAndTypeManager) FunctionAndTypeManager.createTestFunctionAndTypeManager(com.facebook.presto.metadata.FunctionAndTypeManager.createTestFunctionAndTypeManager) AllowAllAccessControl(com.facebook.presto.security.AllowAllAccessControl) AbstractMockMetadata(com.facebook.presto.metadata.AbstractMockMetadata) TablePropertyManager(com.facebook.presto.metadata.TablePropertyManager) CatalogManager(com.facebook.presto.metadata.CatalogManager) Catalog(com.facebook.presto.metadata.Catalog) TestingSession.createBogusTestingCatalog(com.facebook.presto.testing.TestingSession.createBogusTestingCatalog) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 2 with ColumnPropertyManager

use of com.facebook.presto.metadata.ColumnPropertyManager in project presto by prestodb.

the class TestCreateTableTask method setUp.

@BeforeMethod
public void setUp() {
    catalogManager = new CatalogManager();
    functionAndTypeManager = createTestFunctionAndTypeManager();
    transactionManager = createTestTransactionManager(catalogManager);
    tablePropertyManager = new TablePropertyManager();
    columnPropertyManager = new ColumnPropertyManager();
    testCatalog = createBogusTestingCatalog(CATALOG_NAME);
    catalogManager.registerCatalog(testCatalog);
    tablePropertyManager.addProperties(testCatalog.getConnectorId(), ImmutableList.of(stringProperty("baz", "test property", null, false)));
    columnPropertyManager.addProperties(testCatalog.getConnectorId(), ImmutableList.of());
    testSession = testSessionBuilder().setTransactionId(transactionManager.beginTransaction(false)).build();
    metadata = new MockMetadata(functionAndTypeManager, tablePropertyManager, columnPropertyManager, testCatalog.getConnectorId(), emptySet());
}
Also used : ColumnPropertyManager(com.facebook.presto.metadata.ColumnPropertyManager) AbstractMockMetadata(com.facebook.presto.metadata.AbstractMockMetadata) TablePropertyManager(com.facebook.presto.metadata.TablePropertyManager) CatalogManager(com.facebook.presto.metadata.CatalogManager) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

AbstractMockMetadata (com.facebook.presto.metadata.AbstractMockMetadata)2 CatalogManager (com.facebook.presto.metadata.CatalogManager)2 ColumnPropertyManager (com.facebook.presto.metadata.ColumnPropertyManager)2 TablePropertyManager (com.facebook.presto.metadata.TablePropertyManager)2 BeforeMethod (org.testng.annotations.BeforeMethod)2 Catalog (com.facebook.presto.metadata.Catalog)1 FunctionAndTypeManager (com.facebook.presto.metadata.FunctionAndTypeManager)1 FunctionAndTypeManager.createTestFunctionAndTypeManager (com.facebook.presto.metadata.FunctionAndTypeManager.createTestFunctionAndTypeManager)1 AllowAllAccessControl (com.facebook.presto.security.AllowAllAccessControl)1 TestingSession.createBogusTestingCatalog (com.facebook.presto.testing.TestingSession.createBogusTestingCatalog)1