|
| 1 | +== Physical Plan == |
| 2 | +TakeOrderedAndProject (52) |
| 3 | ++- * HashAggregate (51) |
| 4 | + +- Exchange (50) |
| 5 | + +- * HashAggregate (49) |
| 6 | + +- * Project (48) |
| 7 | + +- * BroadcastHashJoin Inner BuildLeft (47) |
| 8 | + :- BroadcastExchange (43) |
| 9 | + : +- * Project (42) |
| 10 | + : +- * BroadcastHashJoin Inner BuildRight (41) |
| 11 | + : :- * Project (35) |
| 12 | + : : +- SortMergeJoin LeftSemi (34) |
| 13 | + : : :- SortMergeJoin LeftSemi (25) |
| 14 | + : : : :- * Sort (5) |
| 15 | + : : : : +- Exchange (4) |
| 16 | + : : : : +- * Filter (3) |
| 17 | + : : : : +- * ColumnarToRow (2) |
| 18 | + : : : : +- Scan parquet default.customer (1) |
| 19 | + : : : +- * Sort (24) |
| 20 | + : : : +- Exchange (23) |
| 21 | + : : : +- Union (22) |
| 22 | + : : : :- * Project (15) |
| 23 | + : : : : +- * BroadcastHashJoin Inner BuildRight (14) |
| 24 | + : : : : :- * Filter (8) |
| 25 | + : : : : : +- * ColumnarToRow (7) |
| 26 | + : : : : : +- Scan parquet default.web_sales (6) |
| 27 | + : : : : +- BroadcastExchange (13) |
| 28 | + : : : : +- * Project (12) |
| 29 | + : : : : +- * Filter (11) |
| 30 | + : : : : +- * ColumnarToRow (10) |
| 31 | + : : : : +- Scan parquet default.date_dim (9) |
| 32 | + : : : +- * Project (21) |
| 33 | + : : : +- * BroadcastHashJoin Inner BuildRight (20) |
| 34 | + : : : :- * Filter (18) |
| 35 | + : : : : +- * ColumnarToRow (17) |
| 36 | + : : : : +- Scan parquet default.catalog_sales (16) |
| 37 | + : : : +- ReusedExchange (19) |
| 38 | + : : +- * Sort (33) |
| 39 | + : : +- Exchange (32) |
| 40 | + : : +- * Project (31) |
| 41 | + : : +- * BroadcastHashJoin Inner BuildRight (30) |
| 42 | + : : :- * Filter (28) |
| 43 | + : : : +- * ColumnarToRow (27) |
| 44 | + : : : +- Scan parquet default.store_sales (26) |
| 45 | + : : +- ReusedExchange (29) |
| 46 | + : +- BroadcastExchange (40) |
| 47 | + : +- * Project (39) |
| 48 | + : +- * Filter (38) |
| 49 | + : +- * ColumnarToRow (37) |
| 50 | + : +- Scan parquet default.customer_address (36) |
| 51 | + +- * Filter (46) |
| 52 | + +- * ColumnarToRow (45) |
| 53 | + +- Scan parquet default.customer_demographics (44) |
| 54 | + |
| 55 | + |
| 56 | +(1) Scan parquet default.customer |
| 57 | +Output [3]: [c_customer_sk#1, c_current_cdemo_sk#2, c_current_addr_sk#3] |
| 58 | +Batched: true |
| 59 | +Location: InMemoryFileIndex [file:/Users/yi.wu/IdeaProjects/spark/sql/core/spark-warehouse/org.apache.spark.sql.TPCDSModifiedPlanStabilityWithStatsSuite/customer] |
| 60 | +PushedFilters: [IsNotNull(c_customer_sk), IsNotNull(c_current_addr_sk), IsNotNull(c_current_cdemo_sk)] |
| 61 | +ReadSchema: struct<c_customer_sk:int,c_current_cdemo_sk:int,c_current_addr_sk:int> |
| 62 | + |
| 63 | +(2) ColumnarToRow [codegen id : 1] |
| 64 | +Input [3]: [c_customer_sk#1, c_current_cdemo_sk#2, c_current_addr_sk#3] |
| 65 | + |
| 66 | +(3) Filter [codegen id : 1] |
| 67 | +Input [3]: [c_customer_sk#1, c_current_cdemo_sk#2, c_current_addr_sk#3] |
| 68 | +Condition : ((isnotnull(c_customer_sk#1) AND isnotnull(c_current_addr_sk#3)) AND isnotnull(c_current_cdemo_sk#2)) |
| 69 | + |
| 70 | +(4) Exchange |
| 71 | +Input [3]: [c_customer_sk#1, c_current_cdemo_sk#2, c_current_addr_sk#3] |
| 72 | +Arguments: hashpartitioning(c_customer_sk#1, 5), true, [id=#4] |
| 73 | + |
| 74 | +(5) Sort [codegen id : 2] |
| 75 | +Input [3]: [c_customer_sk#1, c_current_cdemo_sk#2, c_current_addr_sk#3] |
| 76 | +Arguments: [c_customer_sk#1 ASC NULLS FIRST], false, 0 |
| 77 | + |
| 78 | +(6) Scan parquet default.web_sales |
| 79 | +Output [2]: [ws_sold_date_sk#5, ws_bill_customer_sk#6] |
| 80 | +Batched: true |
| 81 | +Location: InMemoryFileIndex [file:/Users/yi.wu/IdeaProjects/spark/sql/core/spark-warehouse/org.apache.spark.sql.TPCDSModifiedPlanStabilityWithStatsSuite/web_sales] |
| 82 | +PushedFilters: [IsNotNull(ws_sold_date_sk), IsNotNull(ws_bill_customer_sk)] |
| 83 | +ReadSchema: struct<ws_sold_date_sk:int,ws_bill_customer_sk:int> |
| 84 | + |
| 85 | +(7) ColumnarToRow [codegen id : 4] |
| 86 | +Input [2]: [ws_sold_date_sk#5, ws_bill_customer_sk#6] |
| 87 | + |
| 88 | +(8) Filter [codegen id : 4] |
| 89 | +Input [2]: [ws_sold_date_sk#5, ws_bill_customer_sk#6] |
| 90 | +Condition : (isnotnull(ws_sold_date_sk#5) AND isnotnull(ws_bill_customer_sk#6)) |
| 91 | + |
| 92 | +(9) Scan parquet default.date_dim |
| 93 | +Output [3]: [d_date_sk#7, d_year#8, d_moy#9] |
| 94 | +Batched: true |
| 95 | +Location: InMemoryFileIndex [file:/Users/yi.wu/IdeaProjects/spark/sql/core/spark-warehouse/org.apache.spark.sql.TPCDSModifiedPlanStabilityWithStatsSuite/date_dim] |
| 96 | +PushedFilters: [IsNotNull(d_moy), IsNotNull(d_year), EqualTo(d_year,2002), GreaterThanOrEqual(d_moy,4), LessThanOrEqual(d_moy,7), IsNotNull(d_date_sk)] |
| 97 | +ReadSchema: struct<d_date_sk:int,d_year:int,d_moy:int> |
| 98 | + |
| 99 | +(10) ColumnarToRow [codegen id : 3] |
| 100 | +Input [3]: [d_date_sk#7, d_year#8, d_moy#9] |
| 101 | + |
| 102 | +(11) Filter [codegen id : 3] |
| 103 | +Input [3]: [d_date_sk#7, d_year#8, d_moy#9] |
| 104 | +Condition : (((((isnotnull(d_moy#9) AND isnotnull(d_year#8)) AND (d_year#8 = 2002)) AND (d_moy#9 >= 4)) AND (d_moy#9 <= 7)) AND isnotnull(d_date_sk#7)) |
| 105 | + |
| 106 | +(12) Project [codegen id : 3] |
| 107 | +Output [1]: [d_date_sk#7] |
| 108 | +Input [3]: [d_date_sk#7, d_year#8, d_moy#9] |
| 109 | + |
| 110 | +(13) BroadcastExchange |
| 111 | +Input [1]: [d_date_sk#7] |
| 112 | +Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [id=#10] |
| 113 | + |
| 114 | +(14) BroadcastHashJoin [codegen id : 4] |
| 115 | +Left keys [1]: [ws_sold_date_sk#5] |
| 116 | +Right keys [1]: [d_date_sk#7] |
| 117 | +Join condition: None |
| 118 | + |
| 119 | +(15) Project [codegen id : 4] |
| 120 | +Output [1]: [ws_bill_customer_sk#6 AS customer_sk#11] |
| 121 | +Input [3]: [ws_sold_date_sk#5, ws_bill_customer_sk#6, d_date_sk#7] |
| 122 | + |
| 123 | +(16) Scan parquet default.catalog_sales |
| 124 | +Output [2]: [cs_sold_date_sk#12, cs_ship_customer_sk#13] |
| 125 | +Batched: true |
| 126 | +Location: InMemoryFileIndex [file:/Users/yi.wu/IdeaProjects/spark/sql/core/spark-warehouse/org.apache.spark.sql.TPCDSModifiedPlanStabilityWithStatsSuite/catalog_sales] |
| 127 | +PushedFilters: [IsNotNull(cs_sold_date_sk), IsNotNull(cs_ship_customer_sk)] |
| 128 | +ReadSchema: struct<cs_sold_date_sk:int,cs_ship_customer_sk:int> |
| 129 | + |
| 130 | +(17) ColumnarToRow [codegen id : 6] |
| 131 | +Input [2]: [cs_sold_date_sk#12, cs_ship_customer_sk#13] |
| 132 | + |
| 133 | +(18) Filter [codegen id : 6] |
| 134 | +Input [2]: [cs_sold_date_sk#12, cs_ship_customer_sk#13] |
| 135 | +Condition : (isnotnull(cs_sold_date_sk#12) AND isnotnull(cs_ship_customer_sk#13)) |
| 136 | + |
| 137 | +(19) ReusedExchange [Reuses operator id: 13] |
| 138 | +Output [1]: [d_date_sk#7] |
| 139 | + |
| 140 | +(20) BroadcastHashJoin [codegen id : 6] |
| 141 | +Left keys [1]: [cs_sold_date_sk#12] |
| 142 | +Right keys [1]: [d_date_sk#7] |
| 143 | +Join condition: None |
| 144 | + |
| 145 | +(21) Project [codegen id : 6] |
| 146 | +Output [1]: [cs_ship_customer_sk#13 AS customer_sk#14] |
| 147 | +Input [3]: [cs_sold_date_sk#12, cs_ship_customer_sk#13, d_date_sk#7] |
| 148 | + |
| 149 | +(22) Union |
| 150 | + |
| 151 | +(23) Exchange |
| 152 | +Input [1]: [customer_sk#11] |
| 153 | +Arguments: hashpartitioning(customer_sk#11, 5), true, [id=#15] |
| 154 | + |
| 155 | +(24) Sort [codegen id : 7] |
| 156 | +Input [1]: [customer_sk#11] |
| 157 | +Arguments: [customer_sk#11 ASC NULLS FIRST], false, 0 |
| 158 | + |
| 159 | +(25) SortMergeJoin |
| 160 | +Left keys [1]: [c_customer_sk#1] |
| 161 | +Right keys [1]: [customer_sk#11] |
| 162 | +Join condition: None |
| 163 | + |
| 164 | +(26) Scan parquet default.store_sales |
| 165 | +Output [2]: [ss_sold_date_sk#16, ss_customer_sk#17] |
| 166 | +Batched: true |
| 167 | +Location: InMemoryFileIndex [file:/Users/yi.wu/IdeaProjects/spark/sql/core/spark-warehouse/org.apache.spark.sql.TPCDSModifiedPlanStabilityWithStatsSuite/store_sales] |
| 168 | +PushedFilters: [IsNotNull(ss_sold_date_sk), IsNotNull(ss_customer_sk)] |
| 169 | +ReadSchema: struct<ss_sold_date_sk:int,ss_customer_sk:int> |
| 170 | + |
| 171 | +(27) ColumnarToRow [codegen id : 9] |
| 172 | +Input [2]: [ss_sold_date_sk#16, ss_customer_sk#17] |
| 173 | + |
| 174 | +(28) Filter [codegen id : 9] |
| 175 | +Input [2]: [ss_sold_date_sk#16, ss_customer_sk#17] |
| 176 | +Condition : (isnotnull(ss_sold_date_sk#16) AND isnotnull(ss_customer_sk#17)) |
| 177 | + |
| 178 | +(29) ReusedExchange [Reuses operator id: 13] |
| 179 | +Output [1]: [d_date_sk#7] |
| 180 | + |
| 181 | +(30) BroadcastHashJoin [codegen id : 9] |
| 182 | +Left keys [1]: [ss_sold_date_sk#16] |
| 183 | +Right keys [1]: [d_date_sk#7] |
| 184 | +Join condition: None |
| 185 | + |
| 186 | +(31) Project [codegen id : 9] |
| 187 | +Output [1]: [ss_customer_sk#17 AS customer_sk#18] |
| 188 | +Input [3]: [ss_sold_date_sk#16, ss_customer_sk#17, d_date_sk#7] |
| 189 | + |
| 190 | +(32) Exchange |
| 191 | +Input [1]: [customer_sk#18] |
| 192 | +Arguments: hashpartitioning(customer_sk#18, 5), true, [id=#19] |
| 193 | + |
| 194 | +(33) Sort [codegen id : 10] |
| 195 | +Input [1]: [customer_sk#18] |
| 196 | +Arguments: [customer_sk#18 ASC NULLS FIRST], false, 0 |
| 197 | + |
| 198 | +(34) SortMergeJoin |
| 199 | +Left keys [1]: [c_customer_sk#1] |
| 200 | +Right keys [1]: [customer_sk#18] |
| 201 | +Join condition: None |
| 202 | + |
| 203 | +(35) Project [codegen id : 12] |
| 204 | +Output [2]: [c_current_cdemo_sk#2, c_current_addr_sk#3] |
| 205 | +Input [3]: [c_customer_sk#1, c_current_cdemo_sk#2, c_current_addr_sk#3] |
| 206 | + |
| 207 | +(36) Scan parquet default.customer_address |
| 208 | +Output [2]: [ca_address_sk#20, ca_county#21] |
| 209 | +Batched: true |
| 210 | +Location: InMemoryFileIndex [file:/Users/yi.wu/IdeaProjects/spark/sql/core/spark-warehouse/org.apache.spark.sql.TPCDSModifiedPlanStabilityWithStatsSuite/customer_address] |
| 211 | +PushedFilters: [In(ca_county, [Walker County,Richland County,Gaines County,Douglas County,Dona Ana County]), IsNotNull(ca_address_sk)] |
| 212 | +ReadSchema: struct<ca_address_sk:int,ca_county:string> |
| 213 | + |
| 214 | +(37) ColumnarToRow [codegen id : 11] |
| 215 | +Input [2]: [ca_address_sk#20, ca_county#21] |
| 216 | + |
| 217 | +(38) Filter [codegen id : 11] |
| 218 | +Input [2]: [ca_address_sk#20, ca_county#21] |
| 219 | +Condition : (ca_county#21 IN (Walker County,Richland County,Gaines County,Douglas County,Dona Ana County) AND isnotnull(ca_address_sk#20)) |
| 220 | + |
| 221 | +(39) Project [codegen id : 11] |
| 222 | +Output [1]: [ca_address_sk#20] |
| 223 | +Input [2]: [ca_address_sk#20, ca_county#21] |
| 224 | + |
| 225 | +(40) BroadcastExchange |
| 226 | +Input [1]: [ca_address_sk#20] |
| 227 | +Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [id=#22] |
| 228 | + |
| 229 | +(41) BroadcastHashJoin [codegen id : 12] |
| 230 | +Left keys [1]: [c_current_addr_sk#3] |
| 231 | +Right keys [1]: [ca_address_sk#20] |
| 232 | +Join condition: None |
| 233 | + |
| 234 | +(42) Project [codegen id : 12] |
| 235 | +Output [1]: [c_current_cdemo_sk#2] |
| 236 | +Input [3]: [c_current_cdemo_sk#2, c_current_addr_sk#3, ca_address_sk#20] |
| 237 | + |
| 238 | +(43) BroadcastExchange |
| 239 | +Input [1]: [c_current_cdemo_sk#2] |
| 240 | +Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [id=#23] |
| 241 | + |
| 242 | +(44) Scan parquet default.customer_demographics |
| 243 | +Output [9]: [cd_demo_sk#24, cd_gender#25, cd_marital_status#26, cd_education_status#27, cd_purchase_estimate#28, cd_credit_rating#29, cd_dep_count#30, cd_dep_employed_count#31, cd_dep_college_count#32] |
| 244 | +Batched: true |
| 245 | +Location: InMemoryFileIndex [file:/Users/yi.wu/IdeaProjects/spark/sql/core/spark-warehouse/org.apache.spark.sql.TPCDSModifiedPlanStabilityWithStatsSuite/customer_demographics] |
| 246 | +PushedFilters: [IsNotNull(cd_demo_sk)] |
| 247 | +ReadSchema: struct<cd_demo_sk:int,cd_gender:string,cd_marital_status:string,cd_education_status:string,cd_purchase_estimate:int,cd_credit_rating:string,cd_dep_count:int,cd_dep_employed_count:int,cd_dep_college_count:int> |
| 248 | + |
| 249 | +(45) ColumnarToRow |
| 250 | +Input [9]: [cd_demo_sk#24, cd_gender#25, cd_marital_status#26, cd_education_status#27, cd_purchase_estimate#28, cd_credit_rating#29, cd_dep_count#30, cd_dep_employed_count#31, cd_dep_college_count#32] |
| 251 | + |
| 252 | +(46) Filter |
| 253 | +Input [9]: [cd_demo_sk#24, cd_gender#25, cd_marital_status#26, cd_education_status#27, cd_purchase_estimate#28, cd_credit_rating#29, cd_dep_count#30, cd_dep_employed_count#31, cd_dep_college_count#32] |
| 254 | +Condition : isnotnull(cd_demo_sk#24) |
| 255 | + |
| 256 | +(47) BroadcastHashJoin [codegen id : 13] |
| 257 | +Left keys [1]: [c_current_cdemo_sk#2] |
| 258 | +Right keys [1]: [cd_demo_sk#24] |
| 259 | +Join condition: None |
| 260 | + |
| 261 | +(48) Project [codegen id : 13] |
| 262 | +Output [8]: [cd_gender#25, cd_marital_status#26, cd_education_status#27, cd_purchase_estimate#28, cd_credit_rating#29, cd_dep_count#30, cd_dep_employed_count#31, cd_dep_college_count#32] |
| 263 | +Input [10]: [c_current_cdemo_sk#2, cd_demo_sk#24, cd_gender#25, cd_marital_status#26, cd_education_status#27, cd_purchase_estimate#28, cd_credit_rating#29, cd_dep_count#30, cd_dep_employed_count#31, cd_dep_college_count#32] |
| 264 | + |
| 265 | +(49) HashAggregate [codegen id : 13] |
| 266 | +Input [8]: [cd_gender#25, cd_marital_status#26, cd_education_status#27, cd_purchase_estimate#28, cd_credit_rating#29, cd_dep_count#30, cd_dep_employed_count#31, cd_dep_college_count#32] |
| 267 | +Keys [8]: [cd_gender#25, cd_marital_status#26, cd_education_status#27, cd_purchase_estimate#28, cd_credit_rating#29, cd_dep_count#30, cd_dep_employed_count#31, cd_dep_college_count#32] |
| 268 | +Functions [1]: [partial_count(1)] |
| 269 | +Aggregate Attributes [1]: [count#33] |
| 270 | +Results [9]: [cd_gender#25, cd_marital_status#26, cd_education_status#27, cd_purchase_estimate#28, cd_credit_rating#29, cd_dep_count#30, cd_dep_employed_count#31, cd_dep_college_count#32, count#34] |
| 271 | + |
| 272 | +(50) Exchange |
| 273 | +Input [9]: [cd_gender#25, cd_marital_status#26, cd_education_status#27, cd_purchase_estimate#28, cd_credit_rating#29, cd_dep_count#30, cd_dep_employed_count#31, cd_dep_college_count#32, count#34] |
| 274 | +Arguments: hashpartitioning(cd_gender#25, cd_marital_status#26, cd_education_status#27, cd_purchase_estimate#28, cd_credit_rating#29, cd_dep_count#30, cd_dep_employed_count#31, cd_dep_college_count#32, 5), true, [id=#35] |
| 275 | + |
| 276 | +(51) HashAggregate [codegen id : 14] |
| 277 | +Input [9]: [cd_gender#25, cd_marital_status#26, cd_education_status#27, cd_purchase_estimate#28, cd_credit_rating#29, cd_dep_count#30, cd_dep_employed_count#31, cd_dep_college_count#32, count#34] |
| 278 | +Keys [8]: [cd_gender#25, cd_marital_status#26, cd_education_status#27, cd_purchase_estimate#28, cd_credit_rating#29, cd_dep_count#30, cd_dep_employed_count#31, cd_dep_college_count#32] |
| 279 | +Functions [1]: [count(1)] |
| 280 | +Aggregate Attributes [1]: [count(1)#36] |
| 281 | +Results [14]: [cd_gender#25, cd_marital_status#26, cd_education_status#27, count(1)#36 AS cnt1#37, cd_purchase_estimate#28, count(1)#36 AS cnt2#38, cd_credit_rating#29, count(1)#36 AS cnt3#39, cd_dep_count#30, count(1)#36 AS cnt4#40, cd_dep_employed_count#31, count(1)#36 AS cnt5#41, cd_dep_college_count#32, count(1)#36 AS cnt6#42] |
| 282 | + |
| 283 | +(52) TakeOrderedAndProject |
| 284 | +Input [14]: [cd_gender#25, cd_marital_status#26, cd_education_status#27, cnt1#37, cd_purchase_estimate#28, cnt2#38, cd_credit_rating#29, cnt3#39, cd_dep_count#30, cnt4#40, cd_dep_employed_count#31, cnt5#41, cd_dep_college_count#32, cnt6#42] |
| 285 | +Arguments: 100, [cd_gender#25 ASC NULLS FIRST, cd_marital_status#26 ASC NULLS FIRST, cd_education_status#27 ASC NULLS FIRST, cd_purchase_estimate#28 ASC NULLS FIRST, cd_credit_rating#29 ASC NULLS FIRST, cd_dep_count#30 ASC NULLS FIRST, cd_dep_employed_count#31 ASC NULLS FIRST, cd_dep_college_count#32 ASC NULLS FIRST], [cd_gender#25, cd_marital_status#26, cd_education_status#27, cnt1#37, cd_purchase_estimate#28, cnt2#38, cd_credit_rating#29, cnt3#39, cd_dep_count#30, cnt4#40, cd_dep_employed_count#31, cnt5#41, cd_dep_college_count#32, cnt6#42] |
| 286 | + |
0 commit comments