[
https://issues.apache.org/jira/browse/FLINK-31450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated FLINK-31450:
-----------------------------------
Labels: pull-request-available (was: )
> Introduce ExecutableOperation for operations to execute
> -------------------------------------------------------
>
> Key: FLINK-31450
> URL: https://issues.apache.org/jira/browse/FLINK-31450
> Project: Flink
> Issue Type: Sub-task
> Components: Table SQL / Planner
> Reporter: Jark Wu
> Assignee: Jark Wu
> Priority: Major
> Labels: pull-request-available
>
> Colocating the execution logic within the Operation, just like how
> RunnableCommand and V2CommandExec do in Spark. We can introduce a class like:
> {code:java}
> public interface ExecutableOperation {
> TableResultInternal execute(Context ctx);
> interface Context {
> CatalogManager getCatalogManager();
> FunctionCatalog getFunctionCatalog();
> ResourceManager getResourceManager();
> Configuration getConfiguration();
> }
> }
> {code}
> Many base interfaces can extend it (AlterOperation, CreateOperation,
> DropOperation, etc.). This approach improves code readability (not spread
> code across different classes) and make supporting a new statement by just
> adding an Operation class instead of 3 classes (Operation class, Executor
> class, and the mapping class).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)