{"categories":["Hive"],"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftagomoris.hatenablog.com%2Fentry%2F20121122%2F1353558064\" title=\"\u500b\u5225\u96c6\u8a08\u3068\u5168\u4f53\u96c6\u8a08\u30921\u56de\u306eHive\u30af\u30a8\u30ea\u3067\u5b9f\u884c\u3059\u308b - \u305f\u3054\u3082\u308a\u3059\u30e1\u30e2\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","width":"100%","published":"2012-11-22 13:21:04","author_url":"https://blog.hatena.ne.jp/tagomoris/","blog_url":"https://tagomoris.hatenablog.com/","title":"\u500b\u5225\u96c6\u8a08\u3068\u5168\u4f53\u96c6\u8a08\u30921\u56de\u306eHive\u30af\u30a8\u30ea\u3067\u5b9f\u884c\u3059\u308b","author_name":"tagomoris","provider_url":"https://hatena.blog","provider_name":"Hatena Blog","blog_title":"\u305f\u3054\u3082\u308a\u3059\u30e1\u30e2","type":"rich","height":"190","url":"https://tagomoris.hatenablog.com/entry/20121122/1353558064","version":"1.0","image_url":"http://a0.twimg.com/profile_images/1824733408/profile2012_normal.png","description":"\u99ac\u9e7f\u3067\u304b\u3044\u30c7\u30fc\u30bf\u30922\u56de\u306a\u3081\u305f\u304f\u306a\u3044\u3067\u3054\u3056\u308b\uff01 \u3068\u3044\u3046\u8a71\u3002SQL\u306a\u3089 WITH ROLLUP \u3067\u4e00\u767a\u306a\u3093\u3060\u3051\u3069Hive\u3067\u306f\u73fe\u72b6\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u3002(hive 0.9.x or before) select x,sum(y) group by x \u3068 select sum(y) \u3092\u51fa\u3059\u306e\u306b\u540c\u3058\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u30922\u56de\u8210\u3081\u305f\u304f\u306a\u3044\u3001\u3060\u308c\u304b\u795e\u306e\u3054\u3068\u304d\u6551\u3044\u306e\u624b\u30922012-11-22 12:31:00 via YoruFukurou @tagomoris x \u304c null \u306b\u306a\u3089\u306a\u3044\u306a\u3089\u3001SELECT xn, SUM(y) FROM t LATERAL VIEW explode(array(x,null)) \u2026"}