== 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#96495L]
Arguments: Range (13000000, 14000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#96495L % 250000) AS customer_id#96497L, concat(segment-, cast(cast((id#96495L % 12) as int) as string)) AS segment#96501, cast((id#96495L % 14) as int) AS processing_day#96503, ((cast(((id#96495L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#96505, cast((((id#96495L * 29) % 7) + 1) as int) AS events#96507]
Input [1]: [id#96495L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#96497L, segment#96501, processing_day#96503, amount#96505, events#96507, (amount#96505 * cast(events#96507 as double)) AS weighted_amount#96509]
Input [5]: [customer_id#96497L, segment#96501, processing_day#96503, amount#96505, events#96507]
(4) HashAggregate
Input [6]: [customer_id#96497L, segment#96501, processing_day#96503, amount#96505, events#96507, weighted_amount#96509]
Keys [2]: [segment#96501, processing_day#96503]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#96497L, 0.05, 0, 0), partial_sum(events#96507), partial_sum(weighted_amount#96509), partial_avg(amount#96505)]
Aggregate Attributes [57]: [count#96728L, MS[0]#96516L, MS[1]#96517L, MS[2]#96518L, MS[3]#96519L, MS[4]#96520L, MS[5]#96521L, MS[6]#96522L, MS[7]#96523L, MS[8]#96524L, MS[9]#96525L, MS[10]#96526L, MS[11]#96527L, MS[12]#96528L, MS[13]#96529L, MS[14]#96530L, MS[15]#96531L, MS[16]#96532L, MS[17]#96533L, MS[18]#96534L, MS[19]#96535L, MS[20]#96536L, MS[21]#96537L, MS[22]#96538L, MS[23]#96539L, MS[24]#96540L, MS[25]#96541L, MS[26]#96542L, MS[27]#96543L, MS[28]#96544L, MS[29]#96545L, MS[30]#96546L, MS[31]#96547L, MS[32]#96548L, MS[33]#96549L, MS[34]#96550L, MS[35]#96551L, MS[36]#96552L, MS[37]#96553L, MS[38]#96554L, MS[39]#96555L, MS[40]#96556L, MS[41]#96557L, MS[42]#96558L, MS[43]#96559L, MS[44]#96560L, MS[45]#96561L, MS[46]#96562L, MS[47]#96563L, MS[48]#96564L, MS[49]#96565L, MS[50]#96566L, MS[51]#96567L, sum#96729L, sum#96730, sum#96731, count#96732L]
Results [59]: [segment#96501, processing_day#96503, count#96733L, MS[0]#96568L, MS[1]#96569L, MS[2]#96570L, MS[3]#96571L, MS[4]#96572L, MS[5]#96573L, MS[6]#96574L, MS[7]#96575L, MS[8]#96576L, MS[9]#96577L, MS[10]#96578L, MS[11]#96579L, MS[12]#96580L, MS[13]#96581L, MS[14]#96582L, MS[15]#96583L, MS[16]#96584L, MS[17]#96585L, MS[18]#96586L, MS[19]#96587L, MS[20]#96588L, MS[21]#96589L, MS[22]#96590L, MS[23]#96591L, MS[24]#96592L, MS[25]#96593L, MS[26]#96594L, MS[27]#96595L, MS[28]#96596L, MS[29]#96597L, MS[30]#96598L, MS[31]#96599L, MS[32]#96600L, MS[33]#96601L, MS[34]#96602L, MS[35]#96603L, MS[36]#96604L, MS[37]#96605L, MS[38]#96606L, MS[39]#96607L, MS[40]#96608L, MS[41]#96609L, MS[42]#96610L, MS[43]#96611L, MS[44]#96612L, MS[45]#96613L, MS[46]#96614L, MS[47]#96615L, MS[48]#96616L, MS[49]#96617L, MS[50]#96618L, MS[51]#96619L, sum#96734L, sum#96735, sum#96736, count#96737L]
(5) Exchange
Input [59]: [segment#96501, processing_day#96503, count#96733L, MS[0]#96568L, MS[1]#96569L, MS[2]#96570L, MS[3]#96571L, MS[4]#96572L, MS[5]#96573L, MS[6]#96574L, MS[7]#96575L, MS[8]#96576L, MS[9]#96577L, MS[10]#96578L, MS[11]#96579L, MS[12]#96580L, MS[13]#96581L, MS[14]#96582L, MS[15]#96583L, MS[16]#96584L, MS[17]#96585L, MS[18]#96586L, MS[19]#96587L, MS[20]#96588L, MS[21]#96589L, MS[22]#96590L, MS[23]#96591L, MS[24]#96592L, MS[25]#96593L, MS[26]#96594L, MS[27]#96595L, MS[28]#96596L, MS[29]#96597L, MS[30]#96598L, MS[31]#96599L, MS[32]#96600L, MS[33]#96601L, MS[34]#96602L, MS[35]#96603L, MS[36]#96604L, MS[37]#96605L, MS[38]#96606L, MS[39]#96607L, MS[40]#96608L, MS[41]#96609L, MS[42]#96610L, MS[43]#96611L, MS[44]#96612L, MS[45]#96613L, MS[46]#96614L, MS[47]#96615L, MS[48]#96616L, MS[49]#96617L, MS[50]#96618L, MS[51]#96619L, sum#96734L, sum#96735, sum#96736, count#96737L]
Arguments: hashpartitioning(segment#96501, processing_day#96503, 200), ENSURE_REQUIREMENTS, [plan_id=9114]
(6) ShuffleQueryStage
Output [59]: [segment#96501, processing_day#96503, count#96733L, MS[0]#96568L, MS[1]#96569L, MS[2]#96570L, MS[3]#96571L, MS[4]#96572L, MS[5]#96573L, MS[6]#96574L, MS[7]#96575L, MS[8]#96576L, MS[9]#96577L, MS[10]#96578L, MS[11]#96579L, MS[12]#96580L, MS[13]#96581L, MS[14]#96582L, MS[15]#96583L, MS[16]#96584L, MS[17]#96585L, MS[18]#96586L, MS[19]#96587L, MS[20]#96588L, MS[21]#96589L, MS[22]#96590L, MS[23]#96591L, MS[24]#96592L, MS[25]#96593L, MS[26]#96594L, MS[27]#96595L, MS[28]#96596L, MS[29]#96597L, MS[30]#96598L, MS[31]#96599L, MS[32]#96600L, MS[33]#96601L, MS[34]#96602L, MS[35]#96603L, MS[36]#96604L, MS[37]#96605L, MS[38]#96606L, MS[39]#96607L, MS[40]#96608L, MS[41]#96609L, MS[42]#96610L, MS[43]#96611L, MS[44]#96612L, MS[45]#96613L, MS[46]#96614L, MS[47]#96615L, MS[48]#96616L, MS[49]#96617L, MS[50]#96618L, MS[51]#96619L, sum#96734L, sum#96735, sum#96736, count#96737L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#96501, processing_day#96503, count#96733L, MS[0]#96568L, MS[1]#96569L, MS[2]#96570L, MS[3]#96571L, MS[4]#96572L, MS[5]#96573L, MS[6]#96574L, MS[7]#96575L, MS[8]#96576L, MS[9]#96577L, MS[10]#96578L, MS[11]#96579L, MS[12]#96580L, MS[13]#96581L, MS[14]#96582L, MS[15]#96583L, MS[16]#96584L, MS[17]#96585L, MS[18]#96586L, MS[19]#96587L, MS[20]#96588L, MS[21]#96589L, MS[22]#96590L, MS[23]#96591L, MS[24]#96592L, MS[25]#96593L, MS[26]#96594L, MS[27]#96595L, MS[28]#96596L, MS[29]#96597L, MS[30]#96598L, MS[31]#96599L, MS[32]#96600L, MS[33]#96601L, MS[34]#96602L, MS[35]#96603L, MS[36]#96604L, MS[37]#96605L, MS[38]#96606L, MS[39]#96607L, MS[40]#96608L, MS[41]#96609L, MS[42]#96610L, MS[43]#96611L, MS[44]#96612L, MS[45]#96613L, MS[46]#96614L, MS[47]#96615L, MS[48]#96616L, MS[49]#96617L, MS[50]#96618L, MS[51]#96619L, sum#96734L, sum#96735, sum#96736, count#96737L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#96501, processing_day#96503, count#96733L, MS[0]#96568L, MS[1]#96569L, MS[2]#96570L, MS[3]#96571L, MS[4]#96572L, MS[5]#96573L, MS[6]#96574L, MS[7]#96575L, MS[8]#96576L, MS[9]#96577L, MS[10]#96578L, MS[11]#96579L, MS[12]#96580L, MS[13]#96581L, MS[14]#96582L, MS[15]#96583L, MS[16]#96584L, MS[17]#96585L, MS[18]#96586L, MS[19]#96587L, MS[20]#96588L, MS[21]#96589L, MS[22]#96590L, MS[23]#96591L, MS[24]#96592L, MS[25]#96593L, MS[26]#96594L, MS[27]#96595L, MS[28]#96596L, MS[29]#96597L, MS[30]#96598L, MS[31]#96599L, MS[32]#96600L, MS[33]#96601L, MS[34]#96602L, MS[35]#96603L, MS[36]#96604L, MS[37]#96605L, MS[38]#96606L, MS[39]#96607L, MS[40]#96608L, MS[41]#96609L, MS[42]#96610L, MS[43]#96611L, MS[44]#96612L, MS[45]#96613L, MS[46]#96614L, MS[47]#96615L, MS[48]#96616L, MS[49]#96617L, MS[50]#96618L, MS[51]#96619L, sum#96734L, sum#96735, sum#96736, count#96737L]
Keys [2]: [segment#96501, processing_day#96503]
Functions [5]: [count(1), approx_count_distinct(customer_id#96497L, 0.05, 0, 0), sum(events#96507), sum(weighted_amount#96509), avg(amount#96505)]
Aggregate Attributes [5]: [count(1)#96515L, approx_count_distinct(customer_id#96497L, 0.05, 0, 0)#96620L, sum(events#96507)#96621L, sum(weighted_amount#96509)#96622, avg(amount#96505)#96623]
Results [7]: [segment#96501, processing_day#96503, count(1)#96515L AS row_count#96510L, approx_count_distinct(customer_id#96497L, 0.05, 0, 0)#96620L AS unique_customers#96511L, sum(events#96507)#96621L AS event_sum#96512L, sum(weighted_amount#96509)#96622 AS weighted_amount_sum#96513, avg(amount#96505)#96623 AS avg_amount#96514]
(9) Exchange
Input [7]: [segment#96501, processing_day#96503, row_count#96510L, unique_customers#96511L, event_sum#96512L, weighted_amount_sum#96513, avg_amount#96514]
Arguments: rangepartitioning(segment#96501 ASC NULLS FIRST, processing_day#96503 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=9136]
(10) ShuffleQueryStage
Output [7]: [segment#96501, processing_day#96503, row_count#96510L, unique_customers#96511L, event_sum#96512L, weighted_amount_sum#96513, avg_amount#96514]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#96501, processing_day#96503, row_count#96510L, unique_customers#96511L, event_sum#96512L, weighted_amount_sum#96513, avg_amount#96514]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#96501, processing_day#96503, row_count#96510L, unique_customers#96511L, event_sum#96512L, weighted_amount_sum#96513, avg_amount#96514]
Arguments: [segment#96501 ASC NULLS FIRST, processing_day#96503 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#96501, processing_day#96503, row_count#96510L, unique_customers#96511L, event_sum#96512L, weighted_amount_sum#96513, avg_amount#96514]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#96497L, segment#96501, processing_day#96503, amount#96505, events#96507, weighted_amount#96509]
Keys [2]: [segment#96501, processing_day#96503]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#96497L, 0.05, 0, 0), partial_sum(events#96507), partial_sum(weighted_amount#96509), partial_avg(amount#96505)]
Aggregate Attributes [57]: [count#96728L, MS[0]#96516L, MS[1]#96517L, MS[2]#96518L, MS[3]#96519L, MS[4]#96520L, MS[5]#96521L, MS[6]#96522L, MS[7]#96523L, MS[8]#96524L, MS[9]#96525L, MS[10]#96526L, MS[11]#96527L, MS[12]#96528L, MS[13]#96529L, MS[14]#96530L, MS[15]#96531L, MS[16]#96532L, MS[17]#96533L, MS[18]#96534L, MS[19]#96535L, MS[20]#96536L, MS[21]#96537L, MS[22]#96538L, MS[23]#96539L, MS[24]#96540L, MS[25]#96541L, MS[26]#96542L, MS[27]#96543L, MS[28]#96544L, MS[29]#96545L, MS[30]#96546L, MS[31]#96547L, MS[32]#96548L, MS[33]#96549L, MS[34]#96550L, MS[35]#96551L, MS[36]#96552L, MS[37]#96553L, MS[38]#96554L, MS[39]#96555L, MS[40]#96556L, MS[41]#96557L, MS[42]#96558L, MS[43]#96559L, MS[44]#96560L, MS[45]#96561L, MS[46]#96562L, MS[47]#96563L, MS[48]#96564L, MS[49]#96565L, MS[50]#96566L, MS[51]#96567L, sum#96729L, sum#96730, sum#96731, count#96732L]
Results [59]: [segment#96501, processing_day#96503, count#96733L, MS[0]#96568L, MS[1]#96569L, MS[2]#96570L, MS[3]#96571L, MS[4]#96572L, MS[5]#96573L, MS[6]#96574L, MS[7]#96575L, MS[8]#96576L, MS[9]#96577L, MS[10]#96578L, MS[11]#96579L, MS[12]#96580L, MS[13]#96581L, MS[14]#96582L, MS[15]#96583L, MS[16]#96584L, MS[17]#96585L, MS[18]#96586L, MS[19]#96587L, MS[20]#96588L, MS[21]#96589L, MS[22]#96590L, MS[23]#96591L, MS[24]#96592L, MS[25]#96593L, MS[26]#96594L, MS[27]#96595L, MS[28]#96596L, MS[29]#96597L, MS[30]#96598L, MS[31]#96599L, MS[32]#96600L, MS[33]#96601L, MS[34]#96602L, MS[35]#96603L, MS[36]#96604L, MS[37]#96605L, MS[38]#96606L, MS[39]#96607L, MS[40]#96608L, MS[41]#96609L, MS[42]#96610L, MS[43]#96611L, MS[44]#96612L, MS[45]#96613L, MS[46]#96614L, MS[47]#96615L, MS[48]#96616L, MS[49]#96617L, MS[50]#96618L, MS[51]#96619L, sum#96734L, sum#96735, sum#96736, count#96737L]
(15) Exchange
Input [59]: [segment#96501, processing_day#96503, count#96733L, MS[0]#96568L, MS[1]#96569L, MS[2]#96570L, MS[3]#96571L, MS[4]#96572L, MS[5]#96573L, MS[6]#96574L, MS[7]#96575L, MS[8]#96576L, MS[9]#96577L, MS[10]#96578L, MS[11]#96579L, MS[12]#96580L, MS[13]#96581L, MS[14]#96582L, MS[15]#96583L, MS[16]#96584L, MS[17]#96585L, MS[18]#96586L, MS[19]#96587L, MS[20]#96588L, MS[21]#96589L, MS[22]#96590L, MS[23]#96591L, MS[24]#96592L, MS[25]#96593L, MS[26]#96594L, MS[27]#96595L, MS[28]#96596L, MS[29]#96597L, MS[30]#96598L, MS[31]#96599L, MS[32]#96600L, MS[33]#96601L, MS[34]#96602L, MS[35]#96603L, MS[36]#96604L, MS[37]#96605L, MS[38]#96606L, MS[39]#96607L, MS[40]#96608L, MS[41]#96609L, MS[42]#96610L, MS[43]#96611L, MS[44]#96612L, MS[45]#96613L, MS[46]#96614L, MS[47]#96615L, MS[48]#96616L, MS[49]#96617L, MS[50]#96618L, MS[51]#96619L, sum#96734L, sum#96735, sum#96736, count#96737L]
Arguments: hashpartitioning(segment#96501, processing_day#96503, 200), ENSURE_REQUIREMENTS, [plan_id=9094]
(16) HashAggregate
Input [59]: [segment#96501, processing_day#96503, count#96733L, MS[0]#96568L, MS[1]#96569L, MS[2]#96570L, MS[3]#96571L, MS[4]#96572L, MS[5]#96573L, MS[6]#96574L, MS[7]#96575L, MS[8]#96576L, MS[9]#96577L, MS[10]#96578L, MS[11]#96579L, MS[12]#96580L, MS[13]#96581L, MS[14]#96582L, MS[15]#96583L, MS[16]#96584L, MS[17]#96585L, MS[18]#96586L, MS[19]#96587L, MS[20]#96588L, MS[21]#96589L, MS[22]#96590L, MS[23]#96591L, MS[24]#96592L, MS[25]#96593L, MS[26]#96594L, MS[27]#96595L, MS[28]#96596L, MS[29]#96597L, MS[30]#96598L, MS[31]#96599L, MS[32]#96600L, MS[33]#96601L, MS[34]#96602L, MS[35]#96603L, MS[36]#96604L, MS[37]#96605L, MS[38]#96606L, MS[39]#96607L, MS[40]#96608L, MS[41]#96609L, MS[42]#96610L, MS[43]#96611L, MS[44]#96612L, MS[45]#96613L, MS[46]#96614L, MS[47]#96615L, MS[48]#96616L, MS[49]#96617L, MS[50]#96618L, MS[51]#96619L, sum#96734L, sum#96735, sum#96736, count#96737L]
Keys [2]: [segment#96501, processing_day#96503]
Functions [5]: [count(1), approx_count_distinct(customer_id#96497L, 0.05, 0, 0), sum(events#96507), sum(weighted_amount#96509), avg(amount#96505)]
Aggregate Attributes [5]: [count(1)#96515L, approx_count_distinct(customer_id#96497L, 0.05, 0, 0)#96620L, sum(events#96507)#96621L, sum(weighted_amount#96509)#96622, avg(amount#96505)#96623]
Results [7]: [segment#96501, processing_day#96503, count(1)#96515L AS row_count#96510L, approx_count_distinct(customer_id#96497L, 0.05, 0, 0)#96620L AS unique_customers#96511L, sum(events#96507)#96621L AS event_sum#96512L, sum(weighted_amount#96509)#96622 AS weighted_amount_sum#96513, avg(amount#96505)#96623 AS avg_amount#96514]
(17) Exchange
Input [7]: [segment#96501, processing_day#96503, row_count#96510L, unique_customers#96511L, event_sum#96512L, weighted_amount_sum#96513, avg_amount#96514]
Arguments: rangepartitioning(segment#96501 ASC NULLS FIRST, processing_day#96503 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=9097]
(18) Sort
Input [7]: [segment#96501, processing_day#96503, row_count#96510L, unique_customers#96511L, event_sum#96512L, weighted_amount_sum#96513, avg_amount#96514]
Arguments: [segment#96501 ASC NULLS FIRST, processing_day#96503 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#96501, processing_day#96503, row_count#96510L, unique_customers#96511L, event_sum#96512L, weighted_amount_sum#96513, avg_amount#96514]
Arguments: isFinalPlan=true