You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "sunjincheng (JIRA)" <ji...@apache.org> on 2019/02/18 11:27:00 UTC

[jira] [Commented] (FLINK-11068) Convert the API classes *Table, *Window to interfaces

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

sunjincheng commented on FLINK-11068:
-------------------------------------

Thanks for update the description [~twalthr], and thanks [~yanghua] taking the ticket.

Just share my thoughts::)

May be all of *Table and *Window we need both Java and Scala Interface, and Scala Interface should extends the Java Interface,e.g.:
Table.java(api-java)
{code:java}
package org.apache.flink.table.api

public interface Table {
…

Table select(String fields);
Table as(String fields);
...
}{code}
 

Table.scala(api-scala)
{code:java}
package org.apache.flink.table.api.scala

import org.apache.flink.table.api.{Table => JTable}


trait Table extends JTable {
...

def select(fields: Expression*): Table
def as(fields: Expression*): Table
…
}{code}
In this way all the SCALA user can using the JAVA interface. So we can keep consistent with current API behavior.

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: Table API &amp; SQL
>            Reporter: Timo Walther
>            Assignee: vinoyang
>            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)