Search in sources :

Example 1 with ShowQueriesRewrite

use of io.trino.sql.rewrite.ShowQueriesRewrite 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)

Aggregations

ColumnPropertyManager (io.trino.metadata.ColumnPropertyManager)1 MaterializedViewPropertyManager (io.trino.metadata.MaterializedViewPropertyManager)1 SchemaPropertyManager (io.trino.metadata.SchemaPropertyManager)1 SessionPropertyManager (io.trino.metadata.SessionPropertyManager)1 StatementAnalyzerFactory.createTestingStatementAnalyzerFactory (io.trino.sql.analyzer.StatementAnalyzerFactory.createTestingStatementAnalyzerFactory)1 ShowQueriesRewrite (io.trino.sql.rewrite.ShowQueriesRewrite)1 StatementRewrite (io.trino.sql.rewrite.StatementRewrite)1