[ 
https://issues.apache.org/jira/browse/FLINK-11068?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16791790#comment-16791790
 ] 

Hequn Cheng commented on FLINK-11068:
-------------------------------------

Hi [~twalthr], Great to have your suggestions. Thanks for merging the 
FLINK-11449 and the great work. (y) 

I think it is good to open a separate PR for porting the windows and fix the 
GroupWindow issue in it in a backward compatible way. I will start a new jira 
and open a PR on it soon.

One thing need to confirm with you is I find {{ExpressionParser}} is used in 
{{TumbleWithSize}} which make it hard to port {{TumbleWithSize}} directly into 
the api-java module. As a choice, I think we can convert it into an interface 
and use reflection to cerate the {{TumbleWithSizeImpl}} in Tumble.over(). The 
code may looks like:
{code:java}
@PublicEvolving
public class Tumble {
        public static TumbleWithSize over(String size) {
                try {
                        Class clazz = 
Class.forName("org.apache.flink.table.api.TumbleWithSizeImpl");
                        Constructor con = clazz.getConstructor(String.class);
                        return (TumbleWithSize) con.newInstance(size);
                } catch (Throwable t) {
                        throw new TableException("New TumbleWithSizeImpl class 
failed.", t);
                }
        }
}
{code}

What do you think?

> Convert the API classes *Table, *Window to interfaces
> -----------------------------------------------------
>
>                 Key: FLINK-11068
>                 URL: https://issues.apache.org/jira/browse/FLINK-11068
>             Project: Flink
>          Issue Type: Improvement
>          Components: API / Table SQL
>            Reporter: Timo Walther
>            Assignee: Hequn Cheng
>            Priority: Major
>
> A more detailed description can be found in 
> [FLIP-32|https://cwiki.apache.org/confluence/display/FLINK/FLIP-32%3A+Restructure+flink-table+for+future+contributions].
> This includes: Table, GroupedTable, WindowedTable, WindowGroupedTable, 
> OverWindowedTable, Window, OverWindow
> We can keep the "Table" Scala implementation in a planner module until it has 
> been converted to Java.
> We can add a method to the planner later to give us a concrete instance. This 
> is one possibility to have a smooth transition period instead of changing all 
> classes at once.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to