Search in sources :

Example 1 with PlannerContext

use of org.apache.flink.table.planner.delegation.PlannerContext in project flink by apache.

the class JsonSerdeTestUtil method configuredSerdeContext.

static SerdeContext configuredSerdeContext(CatalogManager catalogManager, TableConfig tableConfig) {
    final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
    final ModuleManager moduleManager = new ModuleManager();
    final FunctionCatalog functionCatalog = new FunctionCatalog(tableConfig, catalogManager, moduleManager);
    final PlannerContext plannerContext = new PlannerContext(false, tableConfig, moduleManager, functionCatalog, catalogManager, asRootSchema(new CatalogManagerCalciteSchema(catalogManager, true)), Collections.emptyList());
    return new SerdeContext(new ParserImpl(null, null, plannerContext::createCalciteParser, null), plannerContext.getFlinkContext(), classLoader, FlinkTypeFactory.INSTANCE(), plannerContext.createFrameworkConfig().getOperatorTable());
}
Also used : FunctionCatalog(org.apache.flink.table.catalog.FunctionCatalog) PlannerContext(org.apache.flink.table.planner.delegation.PlannerContext) ParserImpl(org.apache.flink.table.planner.delegation.ParserImpl) ModuleManager(org.apache.flink.table.module.ModuleManager) CatalogManagerCalciteSchema(org.apache.flink.table.planner.catalog.CatalogManagerCalciteSchema)

Aggregations

FunctionCatalog (org.apache.flink.table.catalog.FunctionCatalog)1 ModuleManager (org.apache.flink.table.module.ModuleManager)1 CatalogManagerCalciteSchema (org.apache.flink.table.planner.catalog.CatalogManagerCalciteSchema)1 ParserImpl (org.apache.flink.table.planner.delegation.ParserImpl)1 PlannerContext (org.apache.flink.table.planner.delegation.PlannerContext)1