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

Timo Walther edited comment on FLINK-11447 at 1/30/19 2:45 PM:
---------------------------------------------------------------

[~sunjincheng121] I understand your concerns regarding {{join(String)}}. People 
could misunderstand it as a table name. However, my concern is that table 
environment must not be part of this operation. This object is actually not 
necessary and a {{tableEnv.lateralTable("split(a)”).as (“word, length")}} has 
no meaning on its own. If you check the explanation of the lateral key word, it 
means that "This allows the sub-SELECT to refer to columns of FROM items that 
appear before it in the FROM list". So it has nothing to do with a table 
environment.

[~pnowojski] suggested another solution and I would be in favor of this 
solution:

{code}
Table result = orders.joinLateral("rates(o_proctime)", "o_currency = 
r_currency")
{code}

We would introduce the following signatures:

{code}
joinLateral(Expression)
joinLateral(String)
joinLateral(Expression, Expression)
joinLateral(String, String)
{code}

This is closer to the SQL syntax, preserves the lateral information, and does 
not require to pass a table environment nor can exist on its own.

What do you think?


was (Author: twalthr):
[~sunjincheng121] I understand your concerns regarding {{join(String)}}. People 
could misunderstand it as a table name. However, my concern is that table 
environment must not be part of this operation. This object is actually not 
necessary and a {{tableEnv.lateralTable("split(a)”).as (“word, length")}} has 
no meaning on its own. If you check the explanation of the lateral key word, it 
means that "This allows the sub-SELECT to refer to columns of FROM items that 
appear before it in the FROM list". So it has nothing to do with a table 
environment.

[~pnowojski] suggested another solution:

{code}
Table result = orders.lateralJoin("rates(o_proctime)", "o_currency = 
r_currency")
{code}

What do you think?

> Deprecate "new Table(TableEnvironment, String)"
> -----------------------------------------------
>
>                 Key: FLINK-11447
>                 URL: https://issues.apache.org/jira/browse/FLINK-11447
>             Project: Flink
>          Issue Type: New Feature
>          Components: Table API & SQL
>            Reporter: Timo Walther
>            Assignee: Dian Fu
>            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].
> Once table is an interface we can easily replace the underlying 
> implementation at any time. The constructor call prevents us from converting 
> it into an interface.



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

Reply via email to