文章详情页
mysql - spark sql嵌套查询语法问题
浏览:145日期:2022-06-22 08:18:31
问题描述
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 foundSELECT 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语句原本就有问题?
问题解答
回答1:试下把SQLContext换成HiveContext
上一条:mysql - sql中两个语句的区别下一条:mysql主键名
相关文章:
排行榜

网公网安备