== 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#65521L]
Arguments: Range (2000000, 3000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#65521L % 250000) AS customer_id#65523L, concat(segment-, cast(cast((id#65521L % 12) as int) as string)) AS segment#65527, cast((id#65521L % 14) as int) AS processing_day#65529, ((cast(((id#65521L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#65531, cast((((id#65521L * 29) % 7) + 1) as int) AS events#65533]
Input [1]: [id#65521L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#65523L, segment#65527, processing_day#65529, amount#65531, events#65533, (amount#65531 * cast(events#65533 as double)) AS weighted_amount#65535]
Input [5]: [customer_id#65523L, segment#65527, processing_day#65529, amount#65531, events#65533]
(4) HashAggregate
Input [6]: [customer_id#65523L, segment#65527, processing_day#65529, amount#65531, events#65533, weighted_amount#65535]
Keys [2]: [segment#65527, processing_day#65529]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#65523L, 0.05, 0, 0), partial_sum(events#65533), partial_sum(weighted_amount#65535), partial_avg(amount#65531)]
Aggregate Attributes [57]: [count#65754L, MS[0]#65542L, MS[1]#65543L, MS[2]#65544L, MS[3]#65545L, MS[4]#65546L, MS[5]#65547L, MS[6]#65548L, MS[7]#65549L, MS[8]#65550L, MS[9]#65551L, MS[10]#65552L, MS[11]#65553L, MS[12]#65554L, MS[13]#65555L, MS[14]#65556L, MS[15]#65557L, MS[16]#65558L, MS[17]#65559L, MS[18]#65560L, MS[19]#65561L, MS[20]#65562L, MS[21]#65563L, MS[22]#65564L, MS[23]#65565L, MS[24]#65566L, MS[25]#65567L, MS[26]#65568L, MS[27]#65569L, MS[28]#65570L, MS[29]#65571L, MS[30]#65572L, MS[31]#65573L, MS[32]#65574L, MS[33]#65575L, MS[34]#65576L, MS[35]#65577L, MS[36]#65578L, MS[37]#65579L, MS[38]#65580L, MS[39]#65581L, MS[40]#65582L, MS[41]#65583L, MS[42]#65584L, MS[43]#65585L, MS[44]#65586L, MS[45]#65587L, MS[46]#65588L, MS[47]#65589L, MS[48]#65590L, MS[49]#65591L, MS[50]#65592L, MS[51]#65593L, sum#65755L, sum#65756, sum#65757, count#65758L]
Results [59]: [segment#65527, processing_day#65529, count#65759L, MS[0]#65594L, MS[1]#65595L, MS[2]#65596L, MS[3]#65597L, MS[4]#65598L, MS[5]#65599L, MS[6]#65600L, MS[7]#65601L, MS[8]#65602L, MS[9]#65603L, MS[10]#65604L, MS[11]#65605L, MS[12]#65606L, MS[13]#65607L, MS[14]#65608L, MS[15]#65609L, MS[16]#65610L, MS[17]#65611L, MS[18]#65612L, MS[19]#65613L, MS[20]#65614L, MS[21]#65615L, MS[22]#65616L, MS[23]#65617L, MS[24]#65618L, MS[25]#65619L, MS[26]#65620L, MS[27]#65621L, MS[28]#65622L, MS[29]#65623L, MS[30]#65624L, MS[31]#65625L, MS[32]#65626L, MS[33]#65627L, MS[34]#65628L, MS[35]#65629L, MS[36]#65630L, MS[37]#65631L, MS[38]#65632L, MS[39]#65633L, MS[40]#65634L, MS[41]#65635L, MS[42]#65636L, MS[43]#65637L, MS[44]#65638L, MS[45]#65639L, MS[46]#65640L, MS[47]#65641L, MS[48]#65642L, MS[49]#65643L, MS[50]#65644L, MS[51]#65645L, sum#65760L, sum#65761, sum#65762, count#65763L]
(5) Exchange
Input [59]: [segment#65527, processing_day#65529, count#65759L, MS[0]#65594L, MS[1]#65595L, MS[2]#65596L, MS[3]#65597L, MS[4]#65598L, MS[5]#65599L, MS[6]#65600L, MS[7]#65601L, MS[8]#65602L, MS[9]#65603L, MS[10]#65604L, MS[11]#65605L, MS[12]#65606L, MS[13]#65607L, MS[14]#65608L, MS[15]#65609L, MS[16]#65610L, MS[17]#65611L, MS[18]#65612L, MS[19]#65613L, MS[20]#65614L, MS[21]#65615L, MS[22]#65616L, MS[23]#65617L, MS[24]#65618L, MS[25]#65619L, MS[26]#65620L, MS[27]#65621L, MS[28]#65622L, MS[29]#65623L, MS[30]#65624L, MS[31]#65625L, MS[32]#65626L, MS[33]#65627L, MS[34]#65628L, MS[35]#65629L, MS[36]#65630L, MS[37]#65631L, MS[38]#65632L, MS[39]#65633L, MS[40]#65634L, MS[41]#65635L, MS[42]#65636L, MS[43]#65637L, MS[44]#65638L, MS[45]#65639L, MS[46]#65640L, MS[47]#65641L, MS[48]#65642L, MS[49]#65643L, MS[50]#65644L, MS[51]#65645L, sum#65760L, sum#65761, sum#65762, count#65763L]
Arguments: hashpartitioning(segment#65527, processing_day#65529, 200), ENSURE_REQUIREMENTS, [plan_id=6203]
(6) ShuffleQueryStage
Output [59]: [segment#65527, processing_day#65529, count#65759L, MS[0]#65594L, MS[1]#65595L, MS[2]#65596L, MS[3]#65597L, MS[4]#65598L, MS[5]#65599L, MS[6]#65600L, MS[7]#65601L, MS[8]#65602L, MS[9]#65603L, MS[10]#65604L, MS[11]#65605L, MS[12]#65606L, MS[13]#65607L, MS[14]#65608L, MS[15]#65609L, MS[16]#65610L, MS[17]#65611L, MS[18]#65612L, MS[19]#65613L, MS[20]#65614L, MS[21]#65615L, MS[22]#65616L, MS[23]#65617L, MS[24]#65618L, MS[25]#65619L, MS[26]#65620L, MS[27]#65621L, MS[28]#65622L, MS[29]#65623L, MS[30]#65624L, MS[31]#65625L, MS[32]#65626L, MS[33]#65627L, MS[34]#65628L, MS[35]#65629L, MS[36]#65630L, MS[37]#65631L, MS[38]#65632L, MS[39]#65633L, MS[40]#65634L, MS[41]#65635L, MS[42]#65636L, MS[43]#65637L, MS[44]#65638L, MS[45]#65639L, MS[46]#65640L, MS[47]#65641L, MS[48]#65642L, MS[49]#65643L, MS[50]#65644L, MS[51]#65645L, sum#65760L, sum#65761, sum#65762, count#65763L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#65527, processing_day#65529, count#65759L, MS[0]#65594L, MS[1]#65595L, MS[2]#65596L, MS[3]#65597L, MS[4]#65598L, MS[5]#65599L, MS[6]#65600L, MS[7]#65601L, MS[8]#65602L, MS[9]#65603L, MS[10]#65604L, MS[11]#65605L, MS[12]#65606L, MS[13]#65607L, MS[14]#65608L, MS[15]#65609L, MS[16]#65610L, MS[17]#65611L, MS[18]#65612L, MS[19]#65613L, MS[20]#65614L, MS[21]#65615L, MS[22]#65616L, MS[23]#65617L, MS[24]#65618L, MS[25]#65619L, MS[26]#65620L, MS[27]#65621L, MS[28]#65622L, MS[29]#65623L, MS[30]#65624L, MS[31]#65625L, MS[32]#65626L, MS[33]#65627L, MS[34]#65628L, MS[35]#65629L, MS[36]#65630L, MS[37]#65631L, MS[38]#65632L, MS[39]#65633L, MS[40]#65634L, MS[41]#65635L, MS[42]#65636L, MS[43]#65637L, MS[44]#65638L, MS[45]#65639L, MS[46]#65640L, MS[47]#65641L, MS[48]#65642L, MS[49]#65643L, MS[50]#65644L, MS[51]#65645L, sum#65760L, sum#65761, sum#65762, count#65763L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#65527, processing_day#65529, count#65759L, MS[0]#65594L, MS[1]#65595L, MS[2]#65596L, MS[3]#65597L, MS[4]#65598L, MS[5]#65599L, MS[6]#65600L, MS[7]#65601L, MS[8]#65602L, MS[9]#65603L, MS[10]#65604L, MS[11]#65605L, MS[12]#65606L, MS[13]#65607L, MS[14]#65608L, MS[15]#65609L, MS[16]#65610L, MS[17]#65611L, MS[18]#65612L, MS[19]#65613L, MS[20]#65614L, MS[21]#65615L, MS[22]#65616L, MS[23]#65617L, MS[24]#65618L, MS[25]#65619L, MS[26]#65620L, MS[27]#65621L, MS[28]#65622L, MS[29]#65623L, MS[30]#65624L, MS[31]#65625L, MS[32]#65626L, MS[33]#65627L, MS[34]#65628L, MS[35]#65629L, MS[36]#65630L, MS[37]#65631L, MS[38]#65632L, MS[39]#65633L, MS[40]#65634L, MS[41]#65635L, MS[42]#65636L, MS[43]#65637L, MS[44]#65638L, MS[45]#65639L, MS[46]#65640L, MS[47]#65641L, MS[48]#65642L, MS[49]#65643L, MS[50]#65644L, MS[51]#65645L, sum#65760L, sum#65761, sum#65762, count#65763L]
Keys [2]: [segment#65527, processing_day#65529]
Functions [5]: [count(1), approx_count_distinct(customer_id#65523L, 0.05, 0, 0), sum(events#65533), sum(weighted_amount#65535), avg(amount#65531)]
Aggregate Attributes [5]: [count(1)#65541L, approx_count_distinct(customer_id#65523L, 0.05, 0, 0)#65646L, sum(events#65533)#65647L, sum(weighted_amount#65535)#65648, avg(amount#65531)#65649]
Results [7]: [segment#65527, processing_day#65529, count(1)#65541L AS row_count#65536L, approx_count_distinct(customer_id#65523L, 0.05, 0, 0)#65646L AS unique_customers#65537L, sum(events#65533)#65647L AS event_sum#65538L, sum(weighted_amount#65535)#65648 AS weighted_amount_sum#65539, avg(amount#65531)#65649 AS avg_amount#65540]
(9) Exchange
Input [7]: [segment#65527, processing_day#65529, row_count#65536L, unique_customers#65537L, event_sum#65538L, weighted_amount_sum#65539, avg_amount#65540]
Arguments: rangepartitioning(segment#65527 ASC NULLS FIRST, processing_day#65529 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=6225]
(10) ShuffleQueryStage
Output [7]: [segment#65527, processing_day#65529, row_count#65536L, unique_customers#65537L, event_sum#65538L, weighted_amount_sum#65539, avg_amount#65540]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#65527, processing_day#65529, row_count#65536L, unique_customers#65537L, event_sum#65538L, weighted_amount_sum#65539, avg_amount#65540]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#65527, processing_day#65529, row_count#65536L, unique_customers#65537L, event_sum#65538L, weighted_amount_sum#65539, avg_amount#65540]
Arguments: [segment#65527 ASC NULLS FIRST, processing_day#65529 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#65527, processing_day#65529, row_count#65536L, unique_customers#65537L, event_sum#65538L, weighted_amount_sum#65539, avg_amount#65540]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#65523L, segment#65527, processing_day#65529, amount#65531, events#65533, weighted_amount#65535]
Keys [2]: [segment#65527, processing_day#65529]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#65523L, 0.05, 0, 0), partial_sum(events#65533), partial_sum(weighted_amount#65535), partial_avg(amount#65531)]
Aggregate Attributes [57]: [count#65754L, MS[0]#65542L, MS[1]#65543L, MS[2]#65544L, MS[3]#65545L, MS[4]#65546L, MS[5]#65547L, MS[6]#65548L, MS[7]#65549L, MS[8]#65550L, MS[9]#65551L, MS[10]#65552L, MS[11]#65553L, MS[12]#65554L, MS[13]#65555L, MS[14]#65556L, MS[15]#65557L, MS[16]#65558L, MS[17]#65559L, MS[18]#65560L, MS[19]#65561L, MS[20]#65562L, MS[21]#65563L, MS[22]#65564L, MS[23]#65565L, MS[24]#65566L, MS[25]#65567L, MS[26]#65568L, MS[27]#65569L, MS[28]#65570L, MS[29]#65571L, MS[30]#65572L, MS[31]#65573L, MS[32]#65574L, MS[33]#65575L, MS[34]#65576L, MS[35]#65577L, MS[36]#65578L, MS[37]#65579L, MS[38]#65580L, MS[39]#65581L, MS[40]#65582L, MS[41]#65583L, MS[42]#65584L, MS[43]#65585L, MS[44]#65586L, MS[45]#65587L, MS[46]#65588L, MS[47]#65589L, MS[48]#65590L, MS[49]#65591L, MS[50]#65592L, MS[51]#65593L, sum#65755L, sum#65756, sum#65757, count#65758L]
Results [59]: [segment#65527, processing_day#65529, count#65759L, MS[0]#65594L, MS[1]#65595L, MS[2]#65596L, MS[3]#65597L, MS[4]#65598L, MS[5]#65599L, MS[6]#65600L, MS[7]#65601L, MS[8]#65602L, MS[9]#65603L, MS[10]#65604L, MS[11]#65605L, MS[12]#65606L, MS[13]#65607L, MS[14]#65608L, MS[15]#65609L, MS[16]#65610L, MS[17]#65611L, MS[18]#65612L, MS[19]#65613L, MS[20]#65614L, MS[21]#65615L, MS[22]#65616L, MS[23]#65617L, MS[24]#65618L, MS[25]#65619L, MS[26]#65620L, MS[27]#65621L, MS[28]#65622L, MS[29]#65623L, MS[30]#65624L, MS[31]#65625L, MS[32]#65626L, MS[33]#65627L, MS[34]#65628L, MS[35]#65629L, MS[36]#65630L, MS[37]#65631L, MS[38]#65632L, MS[39]#65633L, MS[40]#65634L, MS[41]#65635L, MS[42]#65636L, MS[43]#65637L, MS[44]#65638L, MS[45]#65639L, MS[46]#65640L, MS[47]#65641L, MS[48]#65642L, MS[49]#65643L, MS[50]#65644L, MS[51]#65645L, sum#65760L, sum#65761, sum#65762, count#65763L]
(15) Exchange
Input [59]: [segment#65527, processing_day#65529, count#65759L, MS[0]#65594L, MS[1]#65595L, MS[2]#65596L, MS[3]#65597L, MS[4]#65598L, MS[5]#65599L, MS[6]#65600L, MS[7]#65601L, MS[8]#65602L, MS[9]#65603L, MS[10]#65604L, MS[11]#65605L, MS[12]#65606L, MS[13]#65607L, MS[14]#65608L, MS[15]#65609L, MS[16]#65610L, MS[17]#65611L, MS[18]#65612L, MS[19]#65613L, MS[20]#65614L, MS[21]#65615L, MS[22]#65616L, MS[23]#65617L, MS[24]#65618L, MS[25]#65619L, MS[26]#65620L, MS[27]#65621L, MS[28]#65622L, MS[29]#65623L, MS[30]#65624L, MS[31]#65625L, MS[32]#65626L, MS[33]#65627L, MS[34]#65628L, MS[35]#65629L, MS[36]#65630L, MS[37]#65631L, MS[38]#65632L, MS[39]#65633L, MS[40]#65634L, MS[41]#65635L, MS[42]#65636L, MS[43]#65637L, MS[44]#65638L, MS[45]#65639L, MS[46]#65640L, MS[47]#65641L, MS[48]#65642L, MS[49]#65643L, MS[50]#65644L, MS[51]#65645L, sum#65760L, sum#65761, sum#65762, count#65763L]
Arguments: hashpartitioning(segment#65527, processing_day#65529, 200), ENSURE_REQUIREMENTS, [plan_id=6183]
(16) HashAggregate
Input [59]: [segment#65527, processing_day#65529, count#65759L, MS[0]#65594L, MS[1]#65595L, MS[2]#65596L, MS[3]#65597L, MS[4]#65598L, MS[5]#65599L, MS[6]#65600L, MS[7]#65601L, MS[8]#65602L, MS[9]#65603L, MS[10]#65604L, MS[11]#65605L, MS[12]#65606L, MS[13]#65607L, MS[14]#65608L, MS[15]#65609L, MS[16]#65610L, MS[17]#65611L, MS[18]#65612L, MS[19]#65613L, MS[20]#65614L, MS[21]#65615L, MS[22]#65616L, MS[23]#65617L, MS[24]#65618L, MS[25]#65619L, MS[26]#65620L, MS[27]#65621L, MS[28]#65622L, MS[29]#65623L, MS[30]#65624L, MS[31]#65625L, MS[32]#65626L, MS[33]#65627L, MS[34]#65628L, MS[35]#65629L, MS[36]#65630L, MS[37]#65631L, MS[38]#65632L, MS[39]#65633L, MS[40]#65634L, MS[41]#65635L, MS[42]#65636L, MS[43]#65637L, MS[44]#65638L, MS[45]#65639L, MS[46]#65640L, MS[47]#65641L, MS[48]#65642L, MS[49]#65643L, MS[50]#65644L, MS[51]#65645L, sum#65760L, sum#65761, sum#65762, count#65763L]
Keys [2]: [segment#65527, processing_day#65529]
Functions [5]: [count(1), approx_count_distinct(customer_id#65523L, 0.05, 0, 0), sum(events#65533), sum(weighted_amount#65535), avg(amount#65531)]
Aggregate Attributes [5]: [count(1)#65541L, approx_count_distinct(customer_id#65523L, 0.05, 0, 0)#65646L, sum(events#65533)#65647L, sum(weighted_amount#65535)#65648, avg(amount#65531)#65649]
Results [7]: [segment#65527, processing_day#65529, count(1)#65541L AS row_count#65536L, approx_count_distinct(customer_id#65523L, 0.05, 0, 0)#65646L AS unique_customers#65537L, sum(events#65533)#65647L AS event_sum#65538L, sum(weighted_amount#65535)#65648 AS weighted_amount_sum#65539, avg(amount#65531)#65649 AS avg_amount#65540]
(17) Exchange
Input [7]: [segment#65527, processing_day#65529, row_count#65536L, unique_customers#65537L, event_sum#65538L, weighted_amount_sum#65539, avg_amount#65540]
Arguments: rangepartitioning(segment#65527 ASC NULLS FIRST, processing_day#65529 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=6186]
(18) Sort
Input [7]: [segment#65527, processing_day#65529, row_count#65536L, unique_customers#65537L, event_sum#65538L, weighted_amount_sum#65539, avg_amount#65540]
Arguments: [segment#65527 ASC NULLS FIRST, processing_day#65529 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#65527, processing_day#65529, row_count#65536L, unique_customers#65537L, event_sum#65538L, weighted_amount_sum#65539, avg_amount#65540]
Arguments: isFinalPlan=true