我已连接到Spark Thrift(Spark SQL版本2.3.1和Hive JDBC 1.2.1.Spark2),并希望在Query下执行执行。
从table1中选择 * age> avg(age);
但是我遇到了" UnsupportedOpertionException"
请您提供帮助。
尝试以下,
使用in/exists/notin/notexists
with avg_age as
(select avg(age) as age1 from table1),
select * from table1 t1, avg_age t2 where t1.age>t2.age.
或使用加入。
select * from table1 t1 inner join
(select avg(age) as age1 from table1) t2
on t1.<UniqCol>=t2.<UniqCol> where t1.age>t2.age.