[
https://issues.apache.org/jira/browse/FLINK-11908?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16791812#comment-16791812
]
Hequn Cheng commented on FLINK-11908:
-------------------------------------
Hi [~twalthr], One thing need to confirm with you is I find
{{ExpressionParser}} is used in {{TumbleWithSize}} which makes 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 create the
{{TumbleWithSizeImpl}} in Tumble.over(). The code may look 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?
> Port window classes into flink-api-java
> ---------------------------------------
>
> Key: FLINK-11908
> URL: https://issues.apache.org/jira/browse/FLINK-11908
> Project: Flink
> Issue Type: Improvement
> Components: API / Table SQL
> Reporter: Hequn Cheng
> Assignee: Hequn Cheng
> Priority: Major
>
> As discussed in FLINK-11068, it is good to open a separate issue for porting
> the window classes before opening a PR for the {{Table}} classes. This can
> make our PR smaller thus will be better to be reviewed.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)