我运行了一段Hive代码。但仍保持在99%。下面是我的代码:
insert overwrite table novaya.brand_info
select goods.brandid, goods.brandnm, cate1.cate1_price, cate2.cate2_price, cate3.cate3_price
from novaya.goods_info goods
left join
(select brandid, brandnm, mng_catecode1, avg(sales_price) as cate1_price
from novaya.goods_info where brandid is not null
group by brandid, brandnm, mng_catecode1) cate1
on goods.brandid=cate1.brandid
left join
(select brandid, brandnm, mng_catecode2, avg(sales_price) as cate2_price
from novaya.goods_info where brandid is not null
group by brandid, brandnm, mng_catecode2) cate2
on goods.brandid=cate2.brandid
left join
(select brandid, brandnm, mng_catecode3, avg(sales_price) as cate3_price
from novaya.goods_info where brandid is not null
group by brandid, brandnm, mng_catecode3) cate3
on goods.brandid=cate3.brandid
where goods.brandid is not null ;
cate1、cate2和cate3将在属于货物表的brandid和brandnm之后应用它们的列的逻辑并不复杂。货物表可能比三个表大。可能是歪斜引起的。如何在不更改配置单元设置的情况下解决此问题。谢谢。
暂无答案!
目前还没有任何答案,快来回答吧!