spark sql中运行报错
SQL:
SELECT his.name, his.oid FROM his_data_zadd AS his WHERE his.value=(SELECT MAX(temp_t.value) FROM his_data_zadd AS temp_t)
报错信息:
py4j.protocol.Py4JJavaError: An error occurred while calling o32.sql.
: java.lang.RuntimeException: [1.76] failure: ``)'' expected but identifier MAX found
SELECT his.name, his.oid FROM his_data_zadd AS his WHERE his.value=(SELECT MAX(temp_t.value) FROM his_data_zadd AS temp_t)
是spark sql的语法解析器不支持这种写法?还是我的sql语句原本就有问题?
試試把SQLContext換成HiveContext