You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "pengzhiwei (JIRA)" <ji...@apache.org> on 2019/04/02 03:30:00 UTC

[jira] [Comment Edited] (CALCITE-1581) UDTF like in hive

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

pengzhiwei edited comment on CALCITE-1581 at 4/2/19 3:29 AM:
-------------------------------------------------------------

Hi [~julianhyde],Thanks for you review.

??That's a lot of rewrite code. It doesn't belong in SqlValidatorImpl. Maybe in SqlToRelConverter? It's usually best not to rewrite before validation - otherwise the error messages don't make sense to the user. If you really must rewrite before validation, could you use performUnconditionalRewrites? And move the code out of the SqlValidatorImpl.??

Well,I have thought of make the rewrite in SqlToRelConverter. However,It cannot pass the validation in SqlValidator.So I have to rewrite it before the validation start. 

Move the rewrite code to performUnconditionalRewrites seem to be a good idea.

??Please restore SqlToRelTestBase.tester to final??

I need to change the SqlConformance in _SqlToRelConverterTest_ to _HIVE._ So I need to make the _SqlToRelTestBase.tester_  modifiable just like the _SqlValidatorTestCase.tester._


was (Author: pzw2018):
Hi [~julianhyde],Thanks for you review.

??That's a lot of rewrite code. It doesn't belong in SqlValidatorImpl. Maybe in SqlToRelConverter? It's usually best not to rewrite before validation - otherwise the error messages don't make sense to the user. If you really must rewrite before validation, could you use performUnconditionalRewrites? And move the code out of the SqlValidatorImpl.??

Well,I have think of make the rewrite in SqlToRelConverter. However,It cannot pass the validation in SqlValidator.So I have to rewrite it before the validation start. 

Move the rewrite code to performUnconditionalRewrites seem to be a good idea.

??Please restore SqlToRelTestBase.tester to final??

I need to change the SqlConformance in _SqlToRelConverterTest_ to _HIVE._ So I need to make the _SqlToRelTestBase.tester_  modifiable just like the _SqlValidatorTestCase.tester._

> 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
>             Fix For: 1.20.0
>
>          Time Spent: 2h 50m
>  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)