xiong duan created CALCITE-6546:
-----------------------------------
Summary: 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
Environment: 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.
Reporter: xiong duan
Assignee: xiong duan
Fix For: 1.38.0
--
This message was sent by Atlassian Jira
(v8.20.10#820010)