[ https://issues.apache.org/jira/browse/CALCITE-1581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16804052#comment-16804052 ]
pengzhiwei commented on CALCITE-1581: ------------------------------------- Hi [~julianhyde], I have make a pr [https://github.com/apache/calcite/pull/1138] for this issue. In this pr,I mainly do the follow things: * Rewrite the "parser.jj" file to support "udtf() as (f0,f1)" in the sql parser stage with minimum modification. * add allowSelectTableFunction() in SqlConformance and also add a kind of Hive SqlConformance. * In SqlValidator stage, I rewrite the "udtf() as (f0,f1)" to the lateral-table sql-node. With this rewritting,this is nothing need to do in the SqlToRelConverter. > 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: Sihua Zhou > Priority: Major > Labels: pull-request-available, udtf > Time Spent: 10m > Remaining Estimate: 0h > > 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 (v7.6.3#76005)