You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Jark Wu (Jira)" <ji...@apache.org> on 2023/03/08 09:20:00 UTC

[jira] [Updated] (FLINK-31368) Move operation execution logic out from TableEnvironmentImpl

     [ https://issues.apache.org/jira/browse/FLINK-31368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jark Wu updated FLINK-31368:
----------------------------
    Description: 
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. 

  was:
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.


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