/
explain.txt
260 lines (212 loc) · 12.1 KB
/
explain.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
== Physical Plan ==
* Sort (46)
+- * HashAggregate (45)
+- Exchange (44)
+- * HashAggregate (43)
+- * HashAggregate (42)
+- * HashAggregate (41)
+- * Project (40)
+- * BroadcastHashJoin Inner BuildRight (39)
:- * Project (33)
: +- * BroadcastHashJoin Inner BuildRight (32)
: :- * Project (26)
: : +- * BroadcastHashJoin Inner BuildRight (25)
: : :- SortMergeJoin LeftAnti (19)
: : : :- * Project (13)
: : : : +- * SortMergeJoin LeftSemi (12)
: : : : :- * Sort (6)
: : : : : +- Exchange (5)
: : : : : +- * Project (4)
: : : : : +- * Filter (3)
: : : : : +- * ColumnarToRow (2)
: : : : : +- Scan parquet default.catalog_sales (1)
: : : : +- * Sort (11)
: : : : +- Exchange (10)
: : : : +- * Project (9)
: : : : +- * ColumnarToRow (8)
: : : : +- Scan parquet default.catalog_sales (7)
: : : +- * Sort (18)
: : : +- Exchange (17)
: : : +- * Project (16)
: : : +- * ColumnarToRow (15)
: : : +- Scan parquet default.catalog_returns (14)
: : +- BroadcastExchange (24)
: : +- * Project (23)
: : +- * Filter (22)
: : +- * ColumnarToRow (21)
: : +- Scan parquet default.date_dim (20)
: +- BroadcastExchange (31)
: +- * Project (30)
: +- * Filter (29)
: +- * ColumnarToRow (28)
: +- Scan parquet default.customer_address (27)
+- BroadcastExchange (38)
+- * Project (37)
+- * Filter (36)
+- * ColumnarToRow (35)
+- Scan parquet default.call_center (34)
(1) Scan parquet default.catalog_sales
Output [8]: [cs_ship_date_sk#1, cs_ship_addr_sk#2, cs_call_center_sk#3, cs_warehouse_sk#4, cs_order_number#5, cs_ext_ship_cost#6, cs_net_profit#7, cs_sold_date_sk#8]
Batched: true
Location [not included in comparison]/{warehouse_dir}/catalog_sales]
PushedFilters: [IsNotNull(cs_ship_date_sk), IsNotNull(cs_ship_addr_sk), IsNotNull(cs_call_center_sk)]
ReadSchema: struct<cs_ship_date_sk:int,cs_ship_addr_sk:int,cs_call_center_sk:int,cs_warehouse_sk:int,cs_order_number:int,cs_ext_ship_cost:decimal(7,2),cs_net_profit:decimal(7,2)>
(2) ColumnarToRow [codegen id : 1]
Input [8]: [cs_ship_date_sk#1, cs_ship_addr_sk#2, cs_call_center_sk#3, cs_warehouse_sk#4, cs_order_number#5, cs_ext_ship_cost#6, cs_net_profit#7, cs_sold_date_sk#8]
(3) Filter [codegen id : 1]
Input [8]: [cs_ship_date_sk#1, cs_ship_addr_sk#2, cs_call_center_sk#3, cs_warehouse_sk#4, cs_order_number#5, cs_ext_ship_cost#6, cs_net_profit#7, cs_sold_date_sk#8]
Condition : ((isnotnull(cs_ship_date_sk#1) AND isnotnull(cs_ship_addr_sk#2)) AND isnotnull(cs_call_center_sk#3))
(4) Project [codegen id : 1]
Output [7]: [cs_ship_date_sk#1, cs_ship_addr_sk#2, cs_call_center_sk#3, cs_warehouse_sk#4, cs_order_number#5, cs_ext_ship_cost#6, cs_net_profit#7]
Input [8]: [cs_ship_date_sk#1, cs_ship_addr_sk#2, cs_call_center_sk#3, cs_warehouse_sk#4, cs_order_number#5, cs_ext_ship_cost#6, cs_net_profit#7, cs_sold_date_sk#8]
(5) Exchange
Input [7]: [cs_ship_date_sk#1, cs_ship_addr_sk#2, cs_call_center_sk#3, cs_warehouse_sk#4, cs_order_number#5, cs_ext_ship_cost#6, cs_net_profit#7]
Arguments: hashpartitioning(cs_order_number#5, 5), ENSURE_REQUIREMENTS, [id=#9]
(6) Sort [codegen id : 2]
Input [7]: [cs_ship_date_sk#1, cs_ship_addr_sk#2, cs_call_center_sk#3, cs_warehouse_sk#4, cs_order_number#5, cs_ext_ship_cost#6, cs_net_profit#7]
Arguments: [cs_order_number#5 ASC NULLS FIRST], false, 0
(7) Scan parquet default.catalog_sales
Output [3]: [cs_warehouse_sk#10, cs_order_number#11, cs_sold_date_sk#12]
Batched: true
Location [not included in comparison]/{warehouse_dir}/catalog_sales]
ReadSchema: struct<cs_warehouse_sk:int,cs_order_number:int>
(8) ColumnarToRow [codegen id : 3]
Input [3]: [cs_warehouse_sk#10, cs_order_number#11, cs_sold_date_sk#12]
(9) Project [codegen id : 3]
Output [2]: [cs_warehouse_sk#10, cs_order_number#11]
Input [3]: [cs_warehouse_sk#10, cs_order_number#11, cs_sold_date_sk#12]
(10) Exchange
Input [2]: [cs_warehouse_sk#10, cs_order_number#11]
Arguments: hashpartitioning(cs_order_number#11, 5), ENSURE_REQUIREMENTS, [id=#13]
(11) Sort [codegen id : 4]
Input [2]: [cs_warehouse_sk#10, cs_order_number#11]
Arguments: [cs_order_number#11 ASC NULLS FIRST], false, 0
(12) SortMergeJoin [codegen id : 5]
Left keys [1]: [cs_order_number#5]
Right keys [1]: [cs_order_number#11]
Join condition: NOT (cs_warehouse_sk#4 = cs_warehouse_sk#10)
(13) Project [codegen id : 5]
Output [6]: [cs_ship_date_sk#1, cs_ship_addr_sk#2, cs_call_center_sk#3, cs_order_number#5, cs_ext_ship_cost#6, cs_net_profit#7]
Input [7]: [cs_ship_date_sk#1, cs_ship_addr_sk#2, cs_call_center_sk#3, cs_warehouse_sk#4, cs_order_number#5, cs_ext_ship_cost#6, cs_net_profit#7]
(14) Scan parquet default.catalog_returns
Output [2]: [cr_order_number#14, cr_returned_date_sk#15]
Batched: true
Location [not included in comparison]/{warehouse_dir}/catalog_returns]
ReadSchema: struct<cr_order_number:int>
(15) ColumnarToRow [codegen id : 6]
Input [2]: [cr_order_number#14, cr_returned_date_sk#15]
(16) Project [codegen id : 6]
Output [1]: [cr_order_number#14]
Input [2]: [cr_order_number#14, cr_returned_date_sk#15]
(17) Exchange
Input [1]: [cr_order_number#14]
Arguments: hashpartitioning(cr_order_number#14, 5), ENSURE_REQUIREMENTS, [id=#16]
(18) Sort [codegen id : 7]
Input [1]: [cr_order_number#14]
Arguments: [cr_order_number#14 ASC NULLS FIRST], false, 0
(19) SortMergeJoin
Left keys [1]: [cs_order_number#5]
Right keys [1]: [cr_order_number#14]
Join condition: None
(20) Scan parquet default.date_dim
Output [2]: [d_date_sk#17, d_date#18]
Batched: true
Location [not included in comparison]/{warehouse_dir}/date_dim]
PushedFilters: [IsNotNull(d_date), GreaterThanOrEqual(d_date,2002-02-01), LessThanOrEqual(d_date,2002-04-02), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_date:date>
(21) ColumnarToRow [codegen id : 8]
Input [2]: [d_date_sk#17, d_date#18]
(22) Filter [codegen id : 8]
Input [2]: [d_date_sk#17, d_date#18]
Condition : (((isnotnull(d_date#18) AND (d_date#18 >= 2002-02-01)) AND (d_date#18 <= 2002-04-02)) AND isnotnull(d_date_sk#17))
(23) Project [codegen id : 8]
Output [1]: [d_date_sk#17]
Input [2]: [d_date_sk#17, d_date#18]
(24) BroadcastExchange
Input [1]: [d_date_sk#17]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [id=#19]
(25) BroadcastHashJoin [codegen id : 11]
Left keys [1]: [cs_ship_date_sk#1]
Right keys [1]: [d_date_sk#17]
Join condition: None
(26) Project [codegen id : 11]
Output [5]: [cs_ship_addr_sk#2, cs_call_center_sk#3, cs_order_number#5, cs_ext_ship_cost#6, cs_net_profit#7]
Input [7]: [cs_ship_date_sk#1, cs_ship_addr_sk#2, cs_call_center_sk#3, cs_order_number#5, cs_ext_ship_cost#6, cs_net_profit#7, d_date_sk#17]
(27) Scan parquet default.customer_address
Output [2]: [ca_address_sk#20, ca_state#21]
Batched: true
Location [not included in comparison]/{warehouse_dir}/customer_address]
PushedFilters: [IsNotNull(ca_state), EqualTo(ca_state,GA), IsNotNull(ca_address_sk)]
ReadSchema: struct<ca_address_sk:int,ca_state:string>
(28) ColumnarToRow [codegen id : 9]
Input [2]: [ca_address_sk#20, ca_state#21]
(29) Filter [codegen id : 9]
Input [2]: [ca_address_sk#20, ca_state#21]
Condition : ((isnotnull(ca_state#21) AND (ca_state#21 = GA)) AND isnotnull(ca_address_sk#20))
(30) Project [codegen id : 9]
Output [1]: [ca_address_sk#20]
Input [2]: [ca_address_sk#20, ca_state#21]
(31) BroadcastExchange
Input [1]: [ca_address_sk#20]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [id=#22]
(32) BroadcastHashJoin [codegen id : 11]
Left keys [1]: [cs_ship_addr_sk#2]
Right keys [1]: [ca_address_sk#20]
Join condition: None
(33) Project [codegen id : 11]
Output [4]: [cs_call_center_sk#3, cs_order_number#5, cs_ext_ship_cost#6, cs_net_profit#7]
Input [6]: [cs_ship_addr_sk#2, cs_call_center_sk#3, cs_order_number#5, cs_ext_ship_cost#6, cs_net_profit#7, ca_address_sk#20]
(34) Scan parquet default.call_center
Output [2]: [cc_call_center_sk#23, cc_county#24]
Batched: true
Location [not included in comparison]/{warehouse_dir}/call_center]
PushedFilters: [IsNotNull(cc_county), EqualTo(cc_county,Williamson County), IsNotNull(cc_call_center_sk)]
ReadSchema: struct<cc_call_center_sk:int,cc_county:string>
(35) ColumnarToRow [codegen id : 10]
Input [2]: [cc_call_center_sk#23, cc_county#24]
(36) Filter [codegen id : 10]
Input [2]: [cc_call_center_sk#23, cc_county#24]
Condition : ((isnotnull(cc_county#24) AND (cc_county#24 = Williamson County)) AND isnotnull(cc_call_center_sk#23))
(37) Project [codegen id : 10]
Output [1]: [cc_call_center_sk#23]
Input [2]: [cc_call_center_sk#23, cc_county#24]
(38) BroadcastExchange
Input [1]: [cc_call_center_sk#23]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)),false), [id=#25]
(39) BroadcastHashJoin [codegen id : 11]
Left keys [1]: [cs_call_center_sk#3]
Right keys [1]: [cc_call_center_sk#23]
Join condition: None
(40) Project [codegen id : 11]
Output [3]: [cs_order_number#5, cs_ext_ship_cost#6, cs_net_profit#7]
Input [5]: [cs_call_center_sk#3, cs_order_number#5, cs_ext_ship_cost#6, cs_net_profit#7, cc_call_center_sk#23]
(41) HashAggregate [codegen id : 11]
Input [3]: [cs_order_number#5, cs_ext_ship_cost#6, cs_net_profit#7]
Keys [1]: [cs_order_number#5]
Functions [2]: [partial_sum(UnscaledValue(cs_ext_ship_cost#6)), partial_sum(UnscaledValue(cs_net_profit#7))]
Aggregate Attributes [2]: [sum(UnscaledValue(cs_ext_ship_cost#6))#26, sum(UnscaledValue(cs_net_profit#7))#27]
Results [3]: [cs_order_number#5, sum#28, sum#29]
(42) HashAggregate [codegen id : 11]
Input [3]: [cs_order_number#5, sum#28, sum#29]
Keys [1]: [cs_order_number#5]
Functions [2]: [merge_sum(UnscaledValue(cs_ext_ship_cost#6)), merge_sum(UnscaledValue(cs_net_profit#7))]
Aggregate Attributes [2]: [sum(UnscaledValue(cs_ext_ship_cost#6))#26, sum(UnscaledValue(cs_net_profit#7))#27]
Results [3]: [cs_order_number#5, sum#28, sum#29]
(43) HashAggregate [codegen id : 11]
Input [3]: [cs_order_number#5, sum#28, sum#29]
Keys: []
Functions [3]: [merge_sum(UnscaledValue(cs_ext_ship_cost#6)), merge_sum(UnscaledValue(cs_net_profit#7)), partial_count(distinct cs_order_number#5)]
Aggregate Attributes [3]: [sum(UnscaledValue(cs_ext_ship_cost#6))#26, sum(UnscaledValue(cs_net_profit#7))#27, count(cs_order_number#5)#30]
Results [3]: [sum#28, sum#29, count#31]
(44) Exchange
Input [3]: [sum#28, sum#29, count#31]
Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#32]
(45) HashAggregate [codegen id : 12]
Input [3]: [sum#28, sum#29, count#31]
Keys: []
Functions [3]: [sum(UnscaledValue(cs_ext_ship_cost#6)), sum(UnscaledValue(cs_net_profit#7)), count(distinct cs_order_number#5)]
Aggregate Attributes [3]: [sum(UnscaledValue(cs_ext_ship_cost#6))#26, sum(UnscaledValue(cs_net_profit#7))#27, count(cs_order_number#5)#30]
Results [3]: [count(cs_order_number#5)#30 AS order count #33, MakeDecimal(sum(UnscaledValue(cs_ext_ship_cost#6))#26,17,2) AS total shipping cost #34, MakeDecimal(sum(UnscaledValue(cs_net_profit#7))#27,17,2) AS total net profit #35]
(46) Sort [codegen id : 12]
Input [3]: [order count #33, total shipping cost #34, total net profit #35]
Arguments: [order count #33 ASC NULLS FIRST], true, 0