flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Piotr Nowojski (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (FLINK-9617) Provide alias for whole records in Table API
Date Thu, 12 Jul 2018 12:16:00 GMT

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

Piotr Nowojski reassigned FLINK-9617:
-------------------------------------

    Assignee:     (was: Piotr Nowojski)

> Provide alias for whole records in Table API
> --------------------------------------------
>
>                 Key: FLINK-9617
>                 URL: https://issues.apache.org/jira/browse/FLINK-9617
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table API &amp; SQL
>    Affects Versions: 1.5.0
>            Reporter: Piotr Nowojski
>            Priority: Major
>
> In SQL we can provide an alias for whole table to avoid column name collisions between
two tables. For example:
> {code:java}
> SELECT
>   SUM(o.amount * r.rate) 
> FROM 
>   Orders AS o, 
>   Rates AS r
> WHERE r.currency = o.currency{code}
> However that's not possible in table API. In Table API user have to provide aliases for
all of the columns, which can be annoying especially if table consists of tens or even hundred
of columns
> For example I would expect some feature like this:
> {code:java}
> val result = orders.as('o)
>   .join(rates(`o.rowtime).as('r), "o.currency = r.currency")
>   .select("SUM(o.amount * r.rate) AS amount")
> {code}
> where \{{rates}} is a TableFunction.
>  



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

Mime
View raw message