Bartosz Kotwica created HIVE-24352:
--------------------------------------

             Summary: SQL CTAS query failed on compilation stage
                 Key: HIVE-24352
                 URL: https://issues.apache.org/jira/browse/HIVE-24352
             Project: Hive
          Issue Type: Bug
          Components: Hive, Parser, PTF-Windowing, SQL
    Affects Versions: 3.1.0
            Reporter: Bartosz Kotwica


I have encountered a compilation error when issue a CTAS query from beeline, 
but without "create table" query works as expected, *narrowed query to 
reproduce:*
 
create table tab_error as
with tab2 as (
    select
        id,
        lead(id) over (partition by id order by id) as x
    from
        (select 1 id) a
)
select
  lead(x) over (partition by id order by id) = 1
from
    tab2
;
 
*ERROR:*
Error: Error while compiling statement: FAILED: SemanticException Failed to 
breakup Windowing invocations into Groups. At least 1 group must only depend on 
input columns. Also check for circular dependencies.
Underlying error: org.apache.hadoop.hive.ql.parse.SemanticException: Line 0:-1 
Invalid column reference '1': (possible column names are: ) 
(state=42000,code=40000)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to