Skip to content

Commit

Permalink
Choose join side with small tables as build side
Browse files Browse the repository at this point in the history
Choose join side with small tables as build (and
replicated if possible) side when CBO fails to
determine join distribution type.
  • Loading branch information
sopel39 committed Sep 17, 2020
1 parent a8b4e79 commit 25abaf0
Show file tree
Hide file tree
Showing 11 changed files with 617 additions and 250 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ local exchange (GATHER, SINGLE, [])
local exchange (GATHER, SINGLE, [])
remote exchange (REPARTITION, HASH, ["i_item_sk_9"])
join (INNER, PARTITIONED):
remote exchange (REPARTITION, HASH, ["i_brand_id_16", "i_category_id_20", "i_class_id_18"])
scan item
final aggregation over (brand_id, category_id, class_id)
local exchange (GATHER, SINGLE, [])
local exchange (REPARTITION, HASH, ["brand_id", "category_id", "class_id"])
remote exchange (REPARTITION, HASH, ["i_brand_id_64", "i_category_id_68", "i_class_id_66"])
partial aggregation over (i_brand_id_64, i_category_id_68, i_class_id_66)
join (INNER, REPLICATED):
Expand Down Expand Up @@ -61,6 +59,9 @@ local exchange (GATHER, SINGLE, [])
local exchange (GATHER, SINGLE, [])
remote exchange (REPLICATE, BROADCAST, [])
scan item
local exchange (GATHER, SINGLE, [])
remote exchange (REPARTITION, HASH, ["i_brand_id_16", "i_category_id_20", "i_class_id_18"])
scan item
local exchange (GATHER, SINGLE, [])
remote exchange (REPLICATE, BROADCAST, [])
final aggregation over ()
Expand Down Expand Up @@ -103,10 +104,8 @@ local exchange (GATHER, SINGLE, [])
local exchange (GATHER, SINGLE, [])
remote exchange (REPARTITION, HASH, ["i_item_sk_473"])
join (INNER, PARTITIONED):
remote exchange (REPARTITION, HASH, ["i_brand_id_480", "i_category_id_484", "i_class_id_482"])
scan item
final aggregation over (brand_id_495, category_id_497, class_id_496)
local exchange (GATHER, SINGLE, [])
local exchange (REPARTITION, HASH, ["brand_id_495", "category_id_497", "class_id_496"])
remote exchange (REPARTITION, HASH, ["i_brand_id_531", "i_category_id_535", "i_class_id_533"])
partial aggregation over (i_brand_id_531, i_category_id_535, i_class_id_533)
join (INNER, REPLICATED):
Expand Down Expand Up @@ -140,6 +139,9 @@ local exchange (GATHER, SINGLE, [])
local exchange (GATHER, SINGLE, [])
remote exchange (REPLICATE, BROADCAST, [])
scan item
local exchange (GATHER, SINGLE, [])
remote exchange (REPARTITION, HASH, ["i_brand_id_480", "i_category_id_484", "i_class_id_482"])
scan item
local exchange (GATHER, SINGLE, [])
remote exchange (REPLICATE, BROADCAST, [])
final aggregation over ()
Expand Down Expand Up @@ -182,10 +184,8 @@ local exchange (GATHER, SINGLE, [])
local exchange (GATHER, SINGLE, [])
remote exchange (REPARTITION, HASH, ["i_item_sk_1015"])
join (INNER, PARTITIONED):
remote exchange (REPARTITION, HASH, ["i_brand_id_1022", "i_category_id_1026", "i_class_id_1024"])
scan item
final aggregation over (brand_id_1037, category_id_1039, class_id_1038)
local exchange (GATHER, SINGLE, [])
local exchange (REPARTITION, HASH, ["brand_id_1037", "category_id_1039", "class_id_1038"])
remote exchange (REPARTITION, HASH, ["i_brand_id_1073", "i_category_id_1077", "i_class_id_1075"])
partial aggregation over (i_brand_id_1073, i_category_id_1077, i_class_id_1075)
join (INNER, REPLICATED):
Expand Down Expand Up @@ -219,6 +219,9 @@ local exchange (GATHER, SINGLE, [])
local exchange (GATHER, SINGLE, [])
remote exchange (REPLICATE, BROADCAST, [])
scan item
local exchange (GATHER, SINGLE, [])
remote exchange (REPARTITION, HASH, ["i_brand_id_1022", "i_category_id_1026", "i_class_id_1024"])
scan item
local exchange (GATHER, SINGLE, [])
remote exchange (REPLICATE, BROADCAST, [])
final aggregation over ()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,50 +1,48 @@
local exchange (GATHER, SINGLE, [])
remote exchange (GATHER, SINGLE, [])
join (INNER, PARTITIONED):
remote exchange (REPARTITION, HASH, ["ss_item_sk_26"])
join (INNER, REPLICATED):
join (INNER, REPLICATED):
join (INNER, PARTITIONED):
remote exchange (REPARTITION, HASH, ["ss_item_sk"])
join (INNER, PARTITIONED):
remote exchange (REPARTITION, HASH, ["rank"])
local exchange (GATHER, SINGLE, [])
remote exchange (GATHER, SINGLE, [])
cross join:
final aggregation over (ss_item_sk)
local exchange (GATHER, SINGLE, [])
remote exchange (REPARTITION, HASH, ["ss_item_sk"])
partial aggregation over (ss_item_sk)
scan store_sales
local exchange (GATHER, SINGLE, [])
remote exchange (REPLICATE, BROADCAST, [])
local exchange (GATHER, SINGLE, [])
remote exchange (GATHER, SINGLE, [])
final aggregation over (ss_store_sk_7)
local exchange (GATHER, SINGLE, [])
remote exchange (REPARTITION, HASH, ["ss_store_sk_7"])
partial aggregation over (ss_store_sk_7)
scan store_sales
local exchange (GATHER, SINGLE, [])
remote exchange (REPARTITION, HASH, ["rank_74"])
remote exchange (REPARTITION, HASH, ["rank"])
local exchange (GATHER, SINGLE, [])
remote exchange (GATHER, SINGLE, [])
cross join:
final aggregation over (ss_item_sk)
local exchange (GATHER, SINGLE, [])
remote exchange (REPARTITION, HASH, ["ss_item_sk"])
partial aggregation over (ss_item_sk)
scan store_sales
local exchange (GATHER, SINGLE, [])
remote exchange (GATHER, SINGLE, [])
cross join:
final aggregation over (ss_item_sk_26)
local exchange (GATHER, SINGLE, [])
remote exchange (REPARTITION, HASH, ["ss_item_sk_26"])
partial aggregation over (ss_item_sk_26)
scan store_sales
local exchange (GATHER, SINGLE, [])
remote exchange (REPLICATE, BROADCAST, [])
remote exchange (REPLICATE, BROADCAST, [])
local exchange (GATHER, SINGLE, [])
remote exchange (GATHER, SINGLE, [])
final aggregation over (ss_store_sk_7)
local exchange (GATHER, SINGLE, [])
remote exchange (GATHER, SINGLE, [])
final aggregation over (ss_store_sk_56)
local exchange (GATHER, SINGLE, [])
remote exchange (REPARTITION, HASH, ["ss_store_sk_56"])
partial aggregation over (ss_store_sk_56)
scan store_sales
remote exchange (REPARTITION, HASH, ["ss_store_sk_7"])
partial aggregation over (ss_store_sk_7)
scan store_sales
local exchange (GATHER, SINGLE, [])
remote exchange (REPARTITION, HASH, ["i_item_sk"])
scan item
remote exchange (REPARTITION, HASH, ["rank_74"])
local exchange (GATHER, SINGLE, [])
remote exchange (GATHER, SINGLE, [])
cross join:
final aggregation over (ss_item_sk_26)
local exchange (GATHER, SINGLE, [])
remote exchange (REPARTITION, HASH, ["ss_item_sk_26"])
partial aggregation over (ss_item_sk_26)
scan store_sales
local exchange (GATHER, SINGLE, [])
remote exchange (REPLICATE, BROADCAST, [])
local exchange (GATHER, SINGLE, [])
remote exchange (GATHER, SINGLE, [])
final aggregation over (ss_store_sk_56)
local exchange (GATHER, SINGLE, [])
remote exchange (REPARTITION, HASH, ["ss_store_sk_56"])
partial aggregation over (ss_store_sk_56)
scan store_sales
local exchange (GATHER, SINGLE, [])
remote exchange (REPLICATE, BROADCAST, [])
scan item
local exchange (GATHER, SINGLE, [])
remote exchange (REPARTITION, HASH, ["i_item_sk_75"])
remote exchange (REPLICATE, BROADCAST, [])
scan item
Loading

0 comments on commit 25abaf0

Please sign in to comment.