我尝试在hql中执行这个查询
SELECT
t.retweeted_screen_name,
sum(retweets) AS total_retweets,
count(*) AS tweet_count
FROM (SELECT
retweeted_status.user.screen_name as retweeted_screen_name,
retweeted_status.text,
max(retweet_count) as retweets
FROM tweets
GROUP BY retweeted_status.user.screen_name,
retweeted_status.text) t
GROUP BY t.retweeted_screen_name
ORDER BY total_retweets DESC
LIMIT 10;
但我得到了一个错误:
处理语句时出错:失败:执行错误,从org.apache.hadoop.hive.ql.exec.mr.mapredtask返回代码2
有人能帮我解决这个问题吗?
1条答案
按热度按时间avwztpqn1#
我认为你需要写sum(t.retweets)作为total\u retweets,而不是sum(retweets)作为total\u retweets,