slinkydeveloper commented on a change in pull request #18885:
URL: https://github.com/apache/flink/pull/18885#discussion_r816789530



##########
File path: 
flink-table/flink-table-api-java/src/test/java/org/apache/flink/table/utils/PlannerMock.java
##########
@@ -50,12 +50,12 @@ public String explain(List<Operation> operations, 
ExplainDetail... extraDetails)
     }
 
     @Override
-    public CompiledPlan loadPlan(PlanReference planReference) throws 
IOException {
+    public CompiledPlanInternalFactory loadPlan(PlanReference planReference) 
throws IOException {

Review comment:
       I pushed the name change.
   
   One other possible solution is to make `CompiledPlanInternal` not extend 
`CompiledPlan`, and add to `CompiledPlanInternal` the `writeToFile`, 
`asJsonString` and `getFlinkVersion`. This way, the "user functionalities" of 
`CompiledPlan` are implemented in a wrapper class, which implements the full 
contract of `CompiledPlan`. Then `ExecNodeCompiledPlan` needs to implement only 
these 3 methods + `getSinkIdentifiers`, and the rest of the "user fluent APIs" 
are implemented by the wrapper.
   
   This IMO really solves the issue in an elegant way, although a bit 
verbosely, but only internally in the `TableEnvironmentImpl`.




-- 
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]


Reply via email to