== Physical Plan ==
AdaptiveSparkPlan (19)
+- == Final Plan ==
ResultQueryStage (13), Statistics(sizeInBytes=8.0 EiB)
+- * Sort (12)
+- AQEShuffleRead (11)
+- ShuffleQueryStage (10), Statistics(sizeInBytes=6.6 KiB, rowCount=84)
+- Exchange (9)
+- HashAggregate (8)
+- AQEShuffleRead (7)
+- ShuffleQueryStage (6), Statistics(sizeInBytes=976.5 KiB, rowCount=2.02E+3)
+- Exchange (5)
+- HashAggregate (4)
+- * Project (3)
+- * Project (2)
+- * Range (1)
+- == Initial Plan ==
Sort (18)
+- Exchange (17)
+- HashAggregate (16)
+- Exchange (15)
+- HashAggregate (14)
+- Project (3)
+- Project (2)
+- Range (1)
(1) Range [codegen id : 1]
Output [1]: [id#57531L]
Arguments: Range (17000000, 18000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#57531L % 250000) AS customer_id#57533L, concat(segment-, cast(cast((id#57531L % 12) as int) as string)) AS segment#57537, cast((id#57531L % 14) as int) AS processing_day#57539, ((cast(((id#57531L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#57541, cast((((id#57531L * 29) % 7) + 1) as int) AS events#57543]
Input [1]: [id#57531L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#57533L, segment#57537, processing_day#57539, amount#57541, events#57543, (amount#57541 * cast(events#57543 as double)) AS weighted_amount#57545]
Input [5]: [customer_id#57533L, segment#57537, processing_day#57539, amount#57541, events#57543]
(4) HashAggregate
Input [6]: [customer_id#57533L, segment#57537, processing_day#57539, amount#57541, events#57543, weighted_amount#57545]
Keys [2]: [segment#57537, processing_day#57539]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#57533L, 0.05, 0, 0), partial_sum(events#57543), partial_sum(weighted_amount#57545), partial_avg(amount#57541)]
Aggregate Attributes [57]: [count#57764L, MS[0]#57552L, MS[1]#57553L, MS[2]#57554L, MS[3]#57555L, MS[4]#57556L, MS[5]#57557L, MS[6]#57558L, MS[7]#57559L, MS[8]#57560L, MS[9]#57561L, MS[10]#57562L, MS[11]#57563L, MS[12]#57564L, MS[13]#57565L, MS[14]#57566L, MS[15]#57567L, MS[16]#57568L, MS[17]#57569L, MS[18]#57570L, MS[19]#57571L, MS[20]#57572L, MS[21]#57573L, MS[22]#57574L, MS[23]#57575L, MS[24]#57576L, MS[25]#57577L, MS[26]#57578L, MS[27]#57579L, MS[28]#57580L, MS[29]#57581L, MS[30]#57582L, MS[31]#57583L, MS[32]#57584L, MS[33]#57585L, MS[34]#57586L, MS[35]#57587L, MS[36]#57588L, MS[37]#57589L, MS[38]#57590L, MS[39]#57591L, MS[40]#57592L, MS[41]#57593L, MS[42]#57594L, MS[43]#57595L, MS[44]#57596L, MS[45]#57597L, MS[46]#57598L, MS[47]#57599L, MS[48]#57600L, MS[49]#57601L, MS[50]#57602L, MS[51]#57603L, sum#57765L, sum#57766, sum#57767, count#57768L]
Results [59]: [segment#57537, processing_day#57539, count#57769L, MS[0]#57604L, MS[1]#57605L, MS[2]#57606L, MS[3]#57607L, MS[4]#57608L, MS[5]#57609L, MS[6]#57610L, MS[7]#57611L, MS[8]#57612L, MS[9]#57613L, MS[10]#57614L, MS[11]#57615L, MS[12]#57616L, MS[13]#57617L, MS[14]#57618L, MS[15]#57619L, MS[16]#57620L, MS[17]#57621L, MS[18]#57622L, MS[19]#57623L, MS[20]#57624L, MS[21]#57625L, MS[22]#57626L, MS[23]#57627L, MS[24]#57628L, MS[25]#57629L, MS[26]#57630L, MS[27]#57631L, MS[28]#57632L, MS[29]#57633L, MS[30]#57634L, MS[31]#57635L, MS[32]#57636L, MS[33]#57637L, MS[34]#57638L, MS[35]#57639L, MS[36]#57640L, MS[37]#57641L, MS[38]#57642L, MS[39]#57643L, MS[40]#57644L, MS[41]#57645L, MS[42]#57646L, MS[43]#57647L, MS[44]#57648L, MS[45]#57649L, MS[46]#57650L, MS[47]#57651L, MS[48]#57652L, MS[49]#57653L, MS[50]#57654L, MS[51]#57655L, sum#57770L, sum#57771, sum#57772, count#57773L]
(5) Exchange
Input [59]: [segment#57537, processing_day#57539, count#57769L, MS[0]#57604L, MS[1]#57605L, MS[2]#57606L, MS[3]#57607L, MS[4]#57608L, MS[5]#57609L, MS[6]#57610L, MS[7]#57611L, MS[8]#57612L, MS[9]#57613L, MS[10]#57614L, MS[11]#57615L, MS[12]#57616L, MS[13]#57617L, MS[14]#57618L, MS[15]#57619L, MS[16]#57620L, MS[17]#57621L, MS[18]#57622L, MS[19]#57623L, MS[20]#57624L, MS[21]#57625L, MS[22]#57626L, MS[23]#57627L, MS[24]#57628L, MS[25]#57629L, MS[26]#57630L, MS[27]#57631L, MS[28]#57632L, MS[29]#57633L, MS[30]#57634L, MS[31]#57635L, MS[32]#57636L, MS[33]#57637L, MS[34]#57638L, MS[35]#57639L, MS[36]#57640L, MS[37]#57641L, MS[38]#57642L, MS[39]#57643L, MS[40]#57644L, MS[41]#57645L, MS[42]#57646L, MS[43]#57647L, MS[44]#57648L, MS[45]#57649L, MS[46]#57650L, MS[47]#57651L, MS[48]#57652L, MS[49]#57653L, MS[50]#57654L, MS[51]#57655L, sum#57770L, sum#57771, sum#57772, count#57773L]
Arguments: hashpartitioning(segment#57537, processing_day#57539, 200), ENSURE_REQUIREMENTS, [plan_id=5450]
(6) ShuffleQueryStage
Output [59]: [segment#57537, processing_day#57539, count#57769L, MS[0]#57604L, MS[1]#57605L, MS[2]#57606L, MS[3]#57607L, MS[4]#57608L, MS[5]#57609L, MS[6]#57610L, MS[7]#57611L, MS[8]#57612L, MS[9]#57613L, MS[10]#57614L, MS[11]#57615L, MS[12]#57616L, MS[13]#57617L, MS[14]#57618L, MS[15]#57619L, MS[16]#57620L, MS[17]#57621L, MS[18]#57622L, MS[19]#57623L, MS[20]#57624L, MS[21]#57625L, MS[22]#57626L, MS[23]#57627L, MS[24]#57628L, MS[25]#57629L, MS[26]#57630L, MS[27]#57631L, MS[28]#57632L, MS[29]#57633L, MS[30]#57634L, MS[31]#57635L, MS[32]#57636L, MS[33]#57637L, MS[34]#57638L, MS[35]#57639L, MS[36]#57640L, MS[37]#57641L, MS[38]#57642L, MS[39]#57643L, MS[40]#57644L, MS[41]#57645L, MS[42]#57646L, MS[43]#57647L, MS[44]#57648L, MS[45]#57649L, MS[46]#57650L, MS[47]#57651L, MS[48]#57652L, MS[49]#57653L, MS[50]#57654L, MS[51]#57655L, sum#57770L, sum#57771, sum#57772, count#57773L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#57537, processing_day#57539, count#57769L, MS[0]#57604L, MS[1]#57605L, MS[2]#57606L, MS[3]#57607L, MS[4]#57608L, MS[5]#57609L, MS[6]#57610L, MS[7]#57611L, MS[8]#57612L, MS[9]#57613L, MS[10]#57614L, MS[11]#57615L, MS[12]#57616L, MS[13]#57617L, MS[14]#57618L, MS[15]#57619L, MS[16]#57620L, MS[17]#57621L, MS[18]#57622L, MS[19]#57623L, MS[20]#57624L, MS[21]#57625L, MS[22]#57626L, MS[23]#57627L, MS[24]#57628L, MS[25]#57629L, MS[26]#57630L, MS[27]#57631L, MS[28]#57632L, MS[29]#57633L, MS[30]#57634L, MS[31]#57635L, MS[32]#57636L, MS[33]#57637L, MS[34]#57638L, MS[35]#57639L, MS[36]#57640L, MS[37]#57641L, MS[38]#57642L, MS[39]#57643L, MS[40]#57644L, MS[41]#57645L, MS[42]#57646L, MS[43]#57647L, MS[44]#57648L, MS[45]#57649L, MS[46]#57650L, MS[47]#57651L, MS[48]#57652L, MS[49]#57653L, MS[50]#57654L, MS[51]#57655L, sum#57770L, sum#57771, sum#57772, count#57773L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#57537, processing_day#57539, count#57769L, MS[0]#57604L, MS[1]#57605L, MS[2]#57606L, MS[3]#57607L, MS[4]#57608L, MS[5]#57609L, MS[6]#57610L, MS[7]#57611L, MS[8]#57612L, MS[9]#57613L, MS[10]#57614L, MS[11]#57615L, MS[12]#57616L, MS[13]#57617L, MS[14]#57618L, MS[15]#57619L, MS[16]#57620L, MS[17]#57621L, MS[18]#57622L, MS[19]#57623L, MS[20]#57624L, MS[21]#57625L, MS[22]#57626L, MS[23]#57627L, MS[24]#57628L, MS[25]#57629L, MS[26]#57630L, MS[27]#57631L, MS[28]#57632L, MS[29]#57633L, MS[30]#57634L, MS[31]#57635L, MS[32]#57636L, MS[33]#57637L, MS[34]#57638L, MS[35]#57639L, MS[36]#57640L, MS[37]#57641L, MS[38]#57642L, MS[39]#57643L, MS[40]#57644L, MS[41]#57645L, MS[42]#57646L, MS[43]#57647L, MS[44]#57648L, MS[45]#57649L, MS[46]#57650L, MS[47]#57651L, MS[48]#57652L, MS[49]#57653L, MS[50]#57654L, MS[51]#57655L, sum#57770L, sum#57771, sum#57772, count#57773L]
Keys [2]: [segment#57537, processing_day#57539]
Functions [5]: [count(1), approx_count_distinct(customer_id#57533L, 0.05, 0, 0), sum(events#57543), sum(weighted_amount#57545), avg(amount#57541)]
Aggregate Attributes [5]: [count(1)#57551L, approx_count_distinct(customer_id#57533L, 0.05, 0, 0)#57656L, sum(events#57543)#57657L, sum(weighted_amount#57545)#57658, avg(amount#57541)#57659]
Results [7]: [segment#57537, processing_day#57539, count(1)#57551L AS row_count#57546L, approx_count_distinct(customer_id#57533L, 0.05, 0, 0)#57656L AS unique_customers#57547L, sum(events#57543)#57657L AS event_sum#57548L, sum(weighted_amount#57545)#57658 AS weighted_amount_sum#57549, avg(amount#57541)#57659 AS avg_amount#57550]
(9) Exchange
Input [7]: [segment#57537, processing_day#57539, row_count#57546L, unique_customers#57547L, event_sum#57548L, weighted_amount_sum#57549, avg_amount#57550]
Arguments: rangepartitioning(segment#57537 ASC NULLS FIRST, processing_day#57539 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=5472]
(10) ShuffleQueryStage
Output [7]: [segment#57537, processing_day#57539, row_count#57546L, unique_customers#57547L, event_sum#57548L, weighted_amount_sum#57549, avg_amount#57550]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#57537, processing_day#57539, row_count#57546L, unique_customers#57547L, event_sum#57548L, weighted_amount_sum#57549, avg_amount#57550]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#57537, processing_day#57539, row_count#57546L, unique_customers#57547L, event_sum#57548L, weighted_amount_sum#57549, avg_amount#57550]
Arguments: [segment#57537 ASC NULLS FIRST, processing_day#57539 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#57537, processing_day#57539, row_count#57546L, unique_customers#57547L, event_sum#57548L, weighted_amount_sum#57549, avg_amount#57550]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#57533L, segment#57537, processing_day#57539, amount#57541, events#57543, weighted_amount#57545]
Keys [2]: [segment#57537, processing_day#57539]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#57533L, 0.05, 0, 0), partial_sum(events#57543), partial_sum(weighted_amount#57545), partial_avg(amount#57541)]
Aggregate Attributes [57]: [count#57764L, MS[0]#57552L, MS[1]#57553L, MS[2]#57554L, MS[3]#57555L, MS[4]#57556L, MS[5]#57557L, MS[6]#57558L, MS[7]#57559L, MS[8]#57560L, MS[9]#57561L, MS[10]#57562L, MS[11]#57563L, MS[12]#57564L, MS[13]#57565L, MS[14]#57566L, MS[15]#57567L, MS[16]#57568L, MS[17]#57569L, MS[18]#57570L, MS[19]#57571L, MS[20]#57572L, MS[21]#57573L, MS[22]#57574L, MS[23]#57575L, MS[24]#57576L, MS[25]#57577L, MS[26]#57578L, MS[27]#57579L, MS[28]#57580L, MS[29]#57581L, MS[30]#57582L, MS[31]#57583L, MS[32]#57584L, MS[33]#57585L, MS[34]#57586L, MS[35]#57587L, MS[36]#57588L, MS[37]#57589L, MS[38]#57590L, MS[39]#57591L, MS[40]#57592L, MS[41]#57593L, MS[42]#57594L, MS[43]#57595L, MS[44]#57596L, MS[45]#57597L, MS[46]#57598L, MS[47]#57599L, MS[48]#57600L, MS[49]#57601L, MS[50]#57602L, MS[51]#57603L, sum#57765L, sum#57766, sum#57767, count#57768L]
Results [59]: [segment#57537, processing_day#57539, count#57769L, MS[0]#57604L, MS[1]#57605L, MS[2]#57606L, MS[3]#57607L, MS[4]#57608L, MS[5]#57609L, MS[6]#57610L, MS[7]#57611L, MS[8]#57612L, MS[9]#57613L, MS[10]#57614L, MS[11]#57615L, MS[12]#57616L, MS[13]#57617L, MS[14]#57618L, MS[15]#57619L, MS[16]#57620L, MS[17]#57621L, MS[18]#57622L, MS[19]#57623L, MS[20]#57624L, MS[21]#57625L, MS[22]#57626L, MS[23]#57627L, MS[24]#57628L, MS[25]#57629L, MS[26]#57630L, MS[27]#57631L, MS[28]#57632L, MS[29]#57633L, MS[30]#57634L, MS[31]#57635L, MS[32]#57636L, MS[33]#57637L, MS[34]#57638L, MS[35]#57639L, MS[36]#57640L, MS[37]#57641L, MS[38]#57642L, MS[39]#57643L, MS[40]#57644L, MS[41]#57645L, MS[42]#57646L, MS[43]#57647L, MS[44]#57648L, MS[45]#57649L, MS[46]#57650L, MS[47]#57651L, MS[48]#57652L, MS[49]#57653L, MS[50]#57654L, MS[51]#57655L, sum#57770L, sum#57771, sum#57772, count#57773L]
(15) Exchange
Input [59]: [segment#57537, processing_day#57539, count#57769L, MS[0]#57604L, MS[1]#57605L, MS[2]#57606L, MS[3]#57607L, MS[4]#57608L, MS[5]#57609L, MS[6]#57610L, MS[7]#57611L, MS[8]#57612L, MS[9]#57613L, MS[10]#57614L, MS[11]#57615L, MS[12]#57616L, MS[13]#57617L, MS[14]#57618L, MS[15]#57619L, MS[16]#57620L, MS[17]#57621L, MS[18]#57622L, MS[19]#57623L, MS[20]#57624L, MS[21]#57625L, MS[22]#57626L, MS[23]#57627L, MS[24]#57628L, MS[25]#57629L, MS[26]#57630L, MS[27]#57631L, MS[28]#57632L, MS[29]#57633L, MS[30]#57634L, MS[31]#57635L, MS[32]#57636L, MS[33]#57637L, MS[34]#57638L, MS[35]#57639L, MS[36]#57640L, MS[37]#57641L, MS[38]#57642L, MS[39]#57643L, MS[40]#57644L, MS[41]#57645L, MS[42]#57646L, MS[43]#57647L, MS[44]#57648L, MS[45]#57649L, MS[46]#57650L, MS[47]#57651L, MS[48]#57652L, MS[49]#57653L, MS[50]#57654L, MS[51]#57655L, sum#57770L, sum#57771, sum#57772, count#57773L]
Arguments: hashpartitioning(segment#57537, processing_day#57539, 200), ENSURE_REQUIREMENTS, [plan_id=5430]
(16) HashAggregate
Input [59]: [segment#57537, processing_day#57539, count#57769L, MS[0]#57604L, MS[1]#57605L, MS[2]#57606L, MS[3]#57607L, MS[4]#57608L, MS[5]#57609L, MS[6]#57610L, MS[7]#57611L, MS[8]#57612L, MS[9]#57613L, MS[10]#57614L, MS[11]#57615L, MS[12]#57616L, MS[13]#57617L, MS[14]#57618L, MS[15]#57619L, MS[16]#57620L, MS[17]#57621L, MS[18]#57622L, MS[19]#57623L, MS[20]#57624L, MS[21]#57625L, MS[22]#57626L, MS[23]#57627L, MS[24]#57628L, MS[25]#57629L, MS[26]#57630L, MS[27]#57631L, MS[28]#57632L, MS[29]#57633L, MS[30]#57634L, MS[31]#57635L, MS[32]#57636L, MS[33]#57637L, MS[34]#57638L, MS[35]#57639L, MS[36]#57640L, MS[37]#57641L, MS[38]#57642L, MS[39]#57643L, MS[40]#57644L, MS[41]#57645L, MS[42]#57646L, MS[43]#57647L, MS[44]#57648L, MS[45]#57649L, MS[46]#57650L, MS[47]#57651L, MS[48]#57652L, MS[49]#57653L, MS[50]#57654L, MS[51]#57655L, sum#57770L, sum#57771, sum#57772, count#57773L]
Keys [2]: [segment#57537, processing_day#57539]
Functions [5]: [count(1), approx_count_distinct(customer_id#57533L, 0.05, 0, 0), sum(events#57543), sum(weighted_amount#57545), avg(amount#57541)]
Aggregate Attributes [5]: [count(1)#57551L, approx_count_distinct(customer_id#57533L, 0.05, 0, 0)#57656L, sum(events#57543)#57657L, sum(weighted_amount#57545)#57658, avg(amount#57541)#57659]
Results [7]: [segment#57537, processing_day#57539, count(1)#57551L AS row_count#57546L, approx_count_distinct(customer_id#57533L, 0.05, 0, 0)#57656L AS unique_customers#57547L, sum(events#57543)#57657L AS event_sum#57548L, sum(weighted_amount#57545)#57658 AS weighted_amount_sum#57549, avg(amount#57541)#57659 AS avg_amount#57550]
(17) Exchange
Input [7]: [segment#57537, processing_day#57539, row_count#57546L, unique_customers#57547L, event_sum#57548L, weighted_amount_sum#57549, avg_amount#57550]
Arguments: rangepartitioning(segment#57537 ASC NULLS FIRST, processing_day#57539 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=5433]
(18) Sort
Input [7]: [segment#57537, processing_day#57539, row_count#57546L, unique_customers#57547L, event_sum#57548L, weighted_amount_sum#57549, avg_amount#57550]
Arguments: [segment#57537 ASC NULLS FIRST, processing_day#57539 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#57537, processing_day#57539, row_count#57546L, unique_customers#57547L, event_sum#57548L, weighted_amount_sum#57549, avg_amount#57550]
Arguments: isFinalPlan=true