我尝试在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;
但是我收到了这个错误:
处理语句时出错:FAILED:执行错误,从org.apache.hadoop.hive.ql.exec.mr.MapRedTask返回代码2
任何人都可以帮我解决这个问题吗?
答案 0 :(得分:0)
我认为你需要写总和(t.retweets)AS total_retweets,而不是sum(转推)AS total_retweets,