Hive UNION ALL报错Top level UNION is not supported currently

 

下面只是一个例子,一般用OR 条件肯定会搞定的。

会报错 FAILED: SemanticException 1:62 Top level UNION is not supported currently; use a subquery for the UNION. Error encountered near token ‘””‘

正确的做法是:把所有UNION ALL子句放到sub-query中,并且给table加别名,如下:

Leave a Reply

Your email address will not be published.