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/17 07:06:00 UTC
[jira] [Closed] (FLINK-31450) Introduce ExecutableOperation for operations to execute
[ https://issues.apache.org/jira/browse/FLINK-31450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jark Wu closed FLINK-31450.
---------------------------
Fix Version/s: 1.18.0
Resolution: Fixed
Fixed in master: d95f69bb459b5efb44c7cd468485d85cd08aef50...768c09c5183c47692bd4af6968fd0381b7a0a006
> 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
> Fix For: 1.18.0
>
>
> 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)