[英]Hive query not working as expected
id bigint from deserializer
created_at string from deserializer
source string from deserializer
favorited boolean from deserializer
retweeted_status struct<text:string,user:struct<screen_name:string,name:string>,retweet_count:int> from deserializer
entities struct<urls:array<struct<expanded_url:string>>,user_mentions:array<struct<screen_name:string,name:string>>,hashtags:array<struct<text:string>>> from deserializer
text string from deserializer
user struct<screen_name:string,name:string,friends_count:int,followers_count:int,statuses_count:int,verified:boolean,utc_offset:int,time_zone:string,location:string> from deserializer
in_reply_to_screen_name string from deserializer
。
select id from election order by election.retweeted_status.retweet_count desc limit 10
該查詢無法正常工作,錯誤為“ SemanticException [錯誤10002]:行1:53無效的列引用'retweeted_status'”
select * from election order by election.retweeted_status.retweet_count desc limit 10
但是這個查詢正在工作
查詢按以下順序執行
1 FROM子句
2 WHERE子句
3 GROUP BY子句
4 HAVING子句
5 SELECT子句
6 ORDER BY子句
7個極限
當從select子句獲得結果集后執行訂單時,由於尚未在select子句中選擇列,因此orderby子句將無法找到要執行操作的列引用。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.