[
https://issues.apache.org/jira/browse/CALCITE-1581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15828640#comment-15828640
]
Julian Hyde commented on CALCITE-1581:
--------------------------------------
Ah, I understand. It is the same as [LINQ's SelectMany
operator|https://dzone.com/articles/selectmany-probably-the-most-p].
I have problems with including it in the SELECT clause for the same reason that
I have problems with how Drill and PostgreSQL include UNNEST in the SELECT
clause -- and [others seem to share my
concerns|https://www.postgresql.org/message-id/[email protected]])
-- namely, it is surprising to someone who doesn't know the details of the
function that the SELECT might return 0, 1 or more than one rows for each row
that comes out of the WHERE or GROUP BY clause.
I wonder if it makes sense to add a {{SELECT MANY}} keyword.
> UDTF like in hive
> -----------------
>
> Key: CALCITE-1581
> URL: https://issues.apache.org/jira/browse/CALCITE-1581
> Project: Calcite
> Issue Type: New Feature
> Reporter: Xiaoyong Deng
> Assignee: Julian Hyde
> Labels: udtf
>
> Support one row in and multi-column/multi-row out(one-to-many mapping), just
> like udtf in hive.
> The query would like this:
> {code}
> select
> func(c0, c1) as (f0, f1, f2)
> from table_name;
> {code}
> c0 and c1 are 'table_name' columns. f0, f1 and f2 are new generated columns.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)