Search in sources :

Example 1 with SchemaPropertyManager

use of io.trino.metadata.SchemaPropertyManager 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);
}
Also used : ColumnPropertyManager(io.trino.metadata.ColumnPropertyManager) StatementRewrite(io.trino.sql.rewrite.StatementRewrite) SessionPropertyManager(io.trino.metadata.SessionPropertyManager) MaterializedViewPropertyManager(io.trino.metadata.MaterializedViewPropertyManager) ShowQueriesRewrite(io.trino.sql.rewrite.ShowQueriesRewrite) SchemaPropertyManager(io.trino.metadata.SchemaPropertyManager) StatementAnalyzerFactory.createTestingStatementAnalyzerFactory(io.trino.sql.analyzer.StatementAnalyzerFactory.createTestingStatementAnalyzerFactory) StatementAnalyzerFactory.createTestingStatementAnalyzerFactory(io.trino.sql.analyzer.StatementAnalyzerFactory.createTestingStatementAnalyzerFactory)

Example 2 with SchemaPropertyManager

use of io.trino.metadata.SchemaPropertyManager in project trino by trinodb.

the class TestCreateSchemaTask method getCreateSchemaTask.

private CreateSchemaTask getCreateSchemaTask() {
    SchemaPropertyManager schemaPropertyManager = new SchemaPropertyManager();
    schemaPropertyManager.addProperties(new CatalogName(CATALOG_NAME), ImmutableList.of());
    return new CreateSchemaTask(plannerContext, new AllowAllAccessControl(), schemaPropertyManager);
}
Also used : AllowAllAccessControl(io.trino.security.AllowAllAccessControl) CatalogName(io.trino.connector.CatalogName) SchemaPropertyManager(io.trino.metadata.SchemaPropertyManager)

Aggregations

SchemaPropertyManager (io.trino.metadata.SchemaPropertyManager)2 CatalogName (io.trino.connector.CatalogName)1 ColumnPropertyManager (io.trino.metadata.ColumnPropertyManager)1 MaterializedViewPropertyManager (io.trino.metadata.MaterializedViewPropertyManager)1 SessionPropertyManager (io.trino.metadata.SessionPropertyManager)1 AllowAllAccessControl (io.trino.security.AllowAllAccessControl)1 StatementAnalyzerFactory.createTestingStatementAnalyzerFactory (io.trino.sql.analyzer.StatementAnalyzerFactory.createTestingStatementAnalyzerFactory)1 ShowQueriesRewrite (io.trino.sql.rewrite.ShowQueriesRewrite)1 StatementRewrite (io.trino.sql.rewrite.StatementRewrite)1