use of io.prestosql.metadata.TablePropertyManager in project hetu-core by openlookeng.
the class TestDropCacheTask method setUp.
@BeforeMethod
public void setUp() {
PropertyService.setProperty(HetuConstant.SPLIT_CACHE_MAP_ENABLED, true);
SplitCacheMap splitCacheMap = createNew();
CatalogManager catalogManager = new CatalogManager();
transactionManager = createTestTransactionManager(catalogManager);
TablePropertyManager tablePropertyManager = new TablePropertyManager();
ColumnPropertyManager columnPropertyManager = new ColumnPropertyManager();
Catalog testCatalog = createBogusTestingCatalog(CATALOG_NAME);
catalogManager.registerCatalog(testCatalog);
tablePropertyManager.addProperties(testCatalog.getConnectorCatalogName(), ImmutableList.of(stringProperty("baz", "test property", null, false)));
columnPropertyManager.addProperties(testCatalog.getConnectorCatalogName(), ImmutableList.of());
testSession = testSessionBuilder().setTransactionId(transactionManager.beginTransaction(false)).build();
ColumnMetadata columnMetadataA = new ColumnMetadata("a", BIGINT);
TupleDomain tupleDomainA = TupleDomain.withColumnDomains(ImmutableMap.of(columnMetadataA, Domain.singleValue(BIGINT, 23L)));
ColumnMetadata columnMetadataB = new ColumnMetadata("b", BIGINT);
TupleDomain tupleDomainB = TupleDomain.withColumnDomains(ImmutableMap.of(columnMetadataB, Domain.singleValue(BIGINT, 88L)));
ColumnMetadata columnMetadataC = new ColumnMetadata("c", BIGINT);
TupleDomain tupleDomainC = TupleDomain.withColumnDomains(ImmutableMap.of(columnMetadataC, Domain.singleValue(BIGINT, 66L)));
// Adding entries into SplitCacheMap
SplitCacheMap.getInstance().addCache(QualifiedName.of(CATALOG_NAME, schema, table), tupleDomainA, "a = 23");
SplitCacheMap.getInstance().addCache(QualifiedName.of(CATALOG_NAME, schema, table2), tupleDomainB, "b = 88");
SplitCacheMap.getInstance().addCache(QualifiedName.of(CATALOG_NAME, schema, table3), tupleDomainC, "b = 66");
stateMachine = createQueryStateMachine("START TRANSACTION", testSession, transactionManager);
}
use of io.prestosql.metadata.TablePropertyManager in project hetu-core by openlookeng.
the class TestCreateTableTask method setUp.
@BeforeMethod
public void setUp() {
CatalogManager catalogManager = new CatalogManager();
TransactionManager transactionManager = createTestTransactionManager(catalogManager);
TablePropertyManager tablePropertyManager = new TablePropertyManager();
ColumnPropertyManager columnPropertyManager = new ColumnPropertyManager();
Catalog testCatalog = createBogusTestingCatalog(CATALOG_NAME);
catalogManager.registerCatalog(testCatalog);
tablePropertyManager.addProperties(testCatalog.getConnectorCatalogName(), ImmutableList.of(stringProperty("baz", "test property", null, false)));
columnPropertyManager.addProperties(testCatalog.getConnectorCatalogName(), ImmutableList.of());
testSession = testSessionBuilder().setTransactionId(transactionManager.beginTransaction(false)).build();
metadata = new MockMetadata(tablePropertyManager, columnPropertyManager, testCatalog.getConnectorCatalogName(), emptySet());
}
Aggregations