1.运行spark-sql shell aboutyun@aboutyun:/opt/spark-1.6.1-bin-hadoop2.6/bin$ spark-sql spark-sql create external table cn(x bigint, y bigint, z bigint, k bigint) row format delimited fields terminated by ',' &nbs ...
下面写法: select * from where set=0 limit 500 union select * from t b where b.sex=1 limit 5000 产生错误: mismatched input union expection eof 改成: (select * from where set=0 limit 500) union (select * from t b where b.sex=1 limit 5000) 即可解决