[ https://issues.apache.org/jira/browse/FLINK-31368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17700500#comment-17700500 ]
Jark Wu edited comment on FLINK-31368 at 3/15/23 4:26 AM: ---------------------------------------------------------- [~luoyuxia], you are right. I think we can create another umbrella issue for this. was (Author: jark): [~luoyuxia], you are right. I think we can create another issue for this. > Move operation execution logic out from TableEnvironmentImpl > ------------------------------------------------------------ > > Key: FLINK-31368 > URL: https://issues.apache.org/jira/browse/FLINK-31368 > Project: Flink > Issue Type: Technical Debt > Components: Table SQL / Planner > Reporter: Jark Wu > Assignee: Jark Wu > Priority: Major > > Currently, {{TableEnvironmentImpl}} is a bit bloated. The implementation of > {{TableEnvironmentImpl}} is filled with lots of operation execution logic > which makes the class hard to read and maintain. Once you want to add/update > an operation, you have to touch the {{TableEnvironmentImpl}}, which is > unnecessary and not clean. > An improvement idea is to extract the operation execution logic (mainly the > command operation, which doesn't trigger a Flink job) out from > {{TableEnvironmentImpl}} and put it close to the corresponding operation. > This is how Spark does with {{RunnableCommand}} and {{V2CommandExec}}. In > this way, we only need to add a new class of {{Operation}} without modifying > {{TableEnvironmentImpl}} to support a new command. > This is just an internal refactoring that doesn't affect user APIs and is > backward-compatible. -- This message was sent by Atlassian Jira (v8.20.10#820010)