hive报错 ParseException line 10:7 missing EOF at 'by' near 'group'

来源:互联网 发布:grub命令行启动ubuntu 编辑:程序博客网 时间:2024/04/29 11:05

查询:

select a,b,c

  from (select a,b,c
          from (select a,b,c
                  from table) a
         where rno = 1) 

 group by a;


报错:FAILED: ParseException line 10:7 missing EOF at 'by' near 'group'


原因:hive本身缺陷,需要在每个子查询后面加别名。


改正:

select a,b,c

  from (select a,b,c
          from (select a,b,c
                  from table) a
         where rno = 1) tb

 group by a;



0 0