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

xiong duan resolved CALCITE-6546.
---------------------------------
    Resolution: Fixed

> Hive dialect does not support a sub-query in the FROM clause without alias
> --------------------------------------------------------------------------
>
>                 Key: CALCITE-6546
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6546
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: xiong duan
>            Assignee: xiong duan
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.38.0
>
>
> In Hive, the SQL:
> {code:java}
>  select * from (select * from table1);
> {code}
> will throw an exception:
> {code:java}
> Error: Error while compiling statement: FAILED: ParseException line 1:36 
> cannot recognize input near '<EOF>' '<EOF>' '<EOF>' in subquery source 
> (state=42000,code=40000)
> {code}
> The SQL:
> {code:java}
> select * from (select * from table1) as table2;
> {code}
> works well.
> So when we generate the Hive SQL in the Jdbc adapter, we need to create an 
> alias for the sub-query in the From clause.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to