twalthr commented on a change in pull request #18908:
URL: https://github.com/apache/flink/pull/18908#discussion_r813894951
##########
File path:
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/codegen/WatermarkGeneratorCodeGenTest.scala
##########
@@ -57,23 +49,9 @@ import org.junit.Test
class WatermarkGeneratorCodeGenTest(useDefinedConstructor: Boolean) {
// mock FlinkPlannerImpl to avoid discovering TableEnvironment and Executor.
- val config = new TableConfig
- val moduleManager = new ModuleManager
- val catalogManager: CatalogManager =
CatalogManagerMocks.createEmptyCatalogManager()
- val functionCatalog = new FunctionCatalog(config, catalogManager,
moduleManager)
- val plannerContext = new PlannerContext(
- false,
- config,
- moduleManager,
- functionCatalog,
- catalogManager,
- asRootSchema(new CatalogManagerCalciteSchema(catalogManager, false)),
- Collections.singletonList(ConventionTraitDef.INSTANCE))
- val planner: FlinkPlannerImpl = plannerContext.createFlinkPlanner(
- catalogManager.getCurrentCatalog,
- catalogManager.getCurrentDatabase)
-
- def getPlanner: FlinkPlannerImpl = planner
+ val plannerMocks = PlannerMocks.create(ConventionTraitDef.INSTANCE)
Review comment:
TBH I think the trait def is actually also not important for most of the
tests, it looks like the location has just not been updated when new trait defs
were added over time.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]