You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "godfrey he (Jira)" <ji...@apache.org> on 2020/12/22 12:09:00 UTC

[jira] [Assigned] (FLINK-20719) Change BatchExecNode & StreamExecNode to interface and make each node extended from ExecNodeBase directly

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

godfrey he reassigned FLINK-20719:
----------------------------------

    Assignee: godfrey he

> Change BatchExecNode & StreamExecNode to interface and make each node extended from ExecNodeBase directly
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-20719
>                 URL: https://issues.apache.org/jira/browse/FLINK-20719
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table SQL / Planner
>            Reporter: godfrey he
>            Assignee: godfrey he
>            Priority: Major
>             Fix For: 1.13.0
>
>
> Currently the inheritance structure of exec nodes is:
> {code:java}
> ExecNode (interface)
>    |_ ExecNodeBase (abstract class)
>          |_ BatchExecNode (abstract class)
>                |_ BatchExecCalc
>                |_ ...
>          |_ StreamExecNode (abstract class)
>                |_ StreamExecCalc
>                |_ ...
> {code}
> the advantage is: each specific node only needs to inherit one base class, and BatchExecNode and StreamExecNode can provide some default implementation
> the disadvantage is: common class of specific batch node and stream node must be interface which only can provide some utility method through default implementation and its sub-classes also have some deduplicate code.  if the common class can be abstract class, its sub-classes is cleaner.  such as: Calc classes
> the structure after adjustment is:
> {code:java}
> ExecNode (interface)
>    |_ ExecNodeBase (abstract class)
>    |_ BatchExecNode (interface)
>    |_ StreamExecNode (interface)
> class BatchExecCalc extends ExecNodeBase implements BatchExecNode
> ...
> class StreamExecCalc extends ExecNodeBase implements StreamExecNode
> ...
> {code}
> the advantage is: common class can be abstract class, its sub-classes will be cleaner; we can add some specific method definition in BatchExecNode and StreamExecNode, which is more extendable.
> the disadvantage is: each specific node must extend from both ExecNodeBase and Batch(/Stream)ExecNode.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)