use of io.trino.metadata.MaterializedViewPropertyManager in project trino by trinodb.
the class BaseDataDefinitionTaskTest method setUp.
@BeforeMethod
public void setUp() {
queryRunner = LocalQueryRunner.create(TEST_SESSION);
transactionManager = queryRunner.getTransactionManager();
queryRunner.createCatalog(CATALOG_NAME, MockConnectorFactory.create("initial"), ImmutableMap.of());
testSession = testSessionBuilder().build();
metadata = new MockMetadata(new CatalogName(CATALOG_NAME));
plannerContext = plannerContextBuilder().withMetadata(metadata).build();
materializedViewPropertyManager = new MaterializedViewPropertyManager();
materializedViewPropertyManager.addProperties(new CatalogName(CATALOG_NAME), ImmutableList.of(longProperty(MATERIALIZED_VIEW_PROPERTY_1_NAME, "property 1", MATERIALIZED_VIEW_PROPERTY_1_DEFAULT_VALUE, false), stringProperty(MATERIALIZED_VIEW_PROPERTY_2_NAME, "property 2", MATERIALIZED_VIEW_PROPERTY_2_DEFAULT_VALUE, false)));
queryStateMachine = stateMachine(transactionManager, createTestMetadataManager(), new AllowAllAccessControl(), testSession);
}
use of io.trino.metadata.MaterializedViewPropertyManager in project trino by trinodb.
the class TestAnalyzer method createAnalyzer.
private Analyzer createAnalyzer(Session session, AccessControl accessControl) {
StatementRewrite statementRewrite = new StatementRewrite(ImmutableSet.of(new ShowQueriesRewrite(plannerContext.getMetadata(), plannerContext.getFunctionManager(), SQL_PARSER, accessControl, new SessionPropertyManager(), new SchemaPropertyManager(), new ColumnPropertyManager(), tablePropertyManager, new MaterializedViewPropertyManager())));
StatementAnalyzerFactory statementAnalyzerFactory = createTestingStatementAnalyzerFactory(plannerContext, accessControl, tablePropertyManager, analyzePropertyManager);
AnalyzerFactory analyzerFactory = new AnalyzerFactory(statementAnalyzerFactory, statementRewrite);
return analyzerFactory.createAnalyzer(session, emptyList(), emptyMap(), WarningCollector.NOOP);
}
Aggregations