[
https://issues.apache.org/jira/browse/CALCITE-1581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15858481#comment-15858481
]
Julian Hyde commented on CALCITE-1581:
--------------------------------------
Yes, LATERAL TABLE is the way to do it. Another option is CROSS APPLY (see
CALCITE-1472).
{code}
select stream
car_color, car_speed, car_plate
from video_stream cross apply TABLE(udtf_analyze(binary_data, meta_data)) as
t(car_color, car_speed, car_plate)
{code}
> 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.15#6346)