2016-06-08 73 views

回答

-2

在嚴格模式下,笛卡爾積是不允許的。所以,你必須有包括連接條件在ON子句而不是WHERE子句這樣的:

hive> SELECT * FROM fracture_act JOIN fracture_ads > WHERE fracture_act.planner_id = fracture_ads.planner_id; 
FAILED: Error in semantic analysis: 
In strict mode, cartesian product is not allowed. If you really want to perform the operation, 
+set hive.mapred.mode=nonstrict+ 

這裏是加入一個正確構造的查詢和ON子句:

hive> SELECT * FROM fracture_act JOIN fracture_ads > ON (fracture_act.planner_id = fracture_ads.planner_id); 

...結果正常...

+0

你能看到我的問題在這裏我的詳細說明http://stackoverflow.com/questions/37889743/how-to-achieve-the-result-of-cartesian-product-by-not-using -the交叉連接功能於ST – Coinnigh