== 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#34513L]
Arguments: Range (15000000, 16000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#34513L % 250000) AS customer_id#34515L, concat(segment-, cast(cast((id#34513L % 12) as int) as string)) AS segment#34519, cast((id#34513L % 14) as int) AS processing_day#34521, ((cast(((id#34513L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#34523, cast((((id#34513L * 29) % 7) + 1) as int) AS events#34525]
Input [1]: [id#34513L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#34515L, segment#34519, processing_day#34521, amount#34523, events#34525, (amount#34523 * cast(events#34525 as double)) AS weighted_amount#34527]
Input [5]: [customer_id#34515L, segment#34519, processing_day#34521, amount#34523, events#34525]
(4) HashAggregate
Input [6]: [customer_id#34515L, segment#34519, processing_day#34521, amount#34523, events#34525, weighted_amount#34527]
Keys [2]: [segment#34519, processing_day#34521]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#34515L, 0.05, 0, 0), partial_sum(events#34525), partial_sum(weighted_amount#34527), partial_avg(amount#34523)]
Aggregate Attributes [57]: [count#34746L, MS[0]#34534L, MS[1]#34535L, MS[2]#34536L, MS[3]#34537L, MS[4]#34538L, MS[5]#34539L, MS[6]#34540L, MS[7]#34541L, MS[8]#34542L, MS[9]#34543L, MS[10]#34544L, MS[11]#34545L, MS[12]#34546L, MS[13]#34547L, MS[14]#34548L, MS[15]#34549L, MS[16]#34550L, MS[17]#34551L, MS[18]#34552L, MS[19]#34553L, MS[20]#34554L, MS[21]#34555L, MS[22]#34556L, MS[23]#34557L, MS[24]#34558L, MS[25]#34559L, MS[26]#34560L, MS[27]#34561L, MS[28]#34562L, MS[29]#34563L, MS[30]#34564L, MS[31]#34565L, MS[32]#34566L, MS[33]#34567L, MS[34]#34568L, MS[35]#34569L, MS[36]#34570L, MS[37]#34571L, MS[38]#34572L, MS[39]#34573L, MS[40]#34574L, MS[41]#34575L, MS[42]#34576L, MS[43]#34577L, MS[44]#34578L, MS[45]#34579L, MS[46]#34580L, MS[47]#34581L, MS[48]#34582L, MS[49]#34583L, MS[50]#34584L, MS[51]#34585L, sum#34747L, sum#34748, sum#34749, count#34750L]
Results [59]: [segment#34519, processing_day#34521, count#34751L, MS[0]#34586L, MS[1]#34587L, MS[2]#34588L, MS[3]#34589L, MS[4]#34590L, MS[5]#34591L, MS[6]#34592L, MS[7]#34593L, MS[8]#34594L, MS[9]#34595L, MS[10]#34596L, MS[11]#34597L, MS[12]#34598L, MS[13]#34599L, MS[14]#34600L, MS[15]#34601L, MS[16]#34602L, MS[17]#34603L, MS[18]#34604L, MS[19]#34605L, MS[20]#34606L, MS[21]#34607L, MS[22]#34608L, MS[23]#34609L, MS[24]#34610L, MS[25]#34611L, MS[26]#34612L, MS[27]#34613L, MS[28]#34614L, MS[29]#34615L, MS[30]#34616L, MS[31]#34617L, MS[32]#34618L, MS[33]#34619L, MS[34]#34620L, MS[35]#34621L, MS[36]#34622L, MS[37]#34623L, MS[38]#34624L, MS[39]#34625L, MS[40]#34626L, MS[41]#34627L, MS[42]#34628L, MS[43]#34629L, MS[44]#34630L, MS[45]#34631L, MS[46]#34632L, MS[47]#34633L, MS[48]#34634L, MS[49]#34635L, MS[50]#34636L, MS[51]#34637L, sum#34752L, sum#34753, sum#34754, count#34755L]
(5) Exchange
Input [59]: [segment#34519, processing_day#34521, count#34751L, MS[0]#34586L, MS[1]#34587L, MS[2]#34588L, MS[3]#34589L, MS[4]#34590L, MS[5]#34591L, MS[6]#34592L, MS[7]#34593L, MS[8]#34594L, MS[9]#34595L, MS[10]#34596L, MS[11]#34597L, MS[12]#34598L, MS[13]#34599L, MS[14]#34600L, MS[15]#34601L, MS[16]#34602L, MS[17]#34603L, MS[18]#34604L, MS[19]#34605L, MS[20]#34606L, MS[21]#34607L, MS[22]#34608L, MS[23]#34609L, MS[24]#34610L, MS[25]#34611L, MS[26]#34612L, MS[27]#34613L, MS[28]#34614L, MS[29]#34615L, MS[30]#34616L, MS[31]#34617L, MS[32]#34618L, MS[33]#34619L, MS[34]#34620L, MS[35]#34621L, MS[36]#34622L, MS[37]#34623L, MS[38]#34624L, MS[39]#34625L, MS[40]#34626L, MS[41]#34627L, MS[42]#34628L, MS[43]#34629L, MS[44]#34630L, MS[45]#34631L, MS[46]#34632L, MS[47]#34633L, MS[48]#34634L, MS[49]#34635L, MS[50]#34636L, MS[51]#34637L, sum#34752L, sum#34753, sum#34754, count#34755L]
Arguments: hashpartitioning(segment#34519, processing_day#34521, 200), ENSURE_REQUIREMENTS, [plan_id=3286]
(6) ShuffleQueryStage
Output [59]: [segment#34519, processing_day#34521, count#34751L, MS[0]#34586L, MS[1]#34587L, MS[2]#34588L, MS[3]#34589L, MS[4]#34590L, MS[5]#34591L, MS[6]#34592L, MS[7]#34593L, MS[8]#34594L, MS[9]#34595L, MS[10]#34596L, MS[11]#34597L, MS[12]#34598L, MS[13]#34599L, MS[14]#34600L, MS[15]#34601L, MS[16]#34602L, MS[17]#34603L, MS[18]#34604L, MS[19]#34605L, MS[20]#34606L, MS[21]#34607L, MS[22]#34608L, MS[23]#34609L, MS[24]#34610L, MS[25]#34611L, MS[26]#34612L, MS[27]#34613L, MS[28]#34614L, MS[29]#34615L, MS[30]#34616L, MS[31]#34617L, MS[32]#34618L, MS[33]#34619L, MS[34]#34620L, MS[35]#34621L, MS[36]#34622L, MS[37]#34623L, MS[38]#34624L, MS[39]#34625L, MS[40]#34626L, MS[41]#34627L, MS[42]#34628L, MS[43]#34629L, MS[44]#34630L, MS[45]#34631L, MS[46]#34632L, MS[47]#34633L, MS[48]#34634L, MS[49]#34635L, MS[50]#34636L, MS[51]#34637L, sum#34752L, sum#34753, sum#34754, count#34755L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#34519, processing_day#34521, count#34751L, MS[0]#34586L, MS[1]#34587L, MS[2]#34588L, MS[3]#34589L, MS[4]#34590L, MS[5]#34591L, MS[6]#34592L, MS[7]#34593L, MS[8]#34594L, MS[9]#34595L, MS[10]#34596L, MS[11]#34597L, MS[12]#34598L, MS[13]#34599L, MS[14]#34600L, MS[15]#34601L, MS[16]#34602L, MS[17]#34603L, MS[18]#34604L, MS[19]#34605L, MS[20]#34606L, MS[21]#34607L, MS[22]#34608L, MS[23]#34609L, MS[24]#34610L, MS[25]#34611L, MS[26]#34612L, MS[27]#34613L, MS[28]#34614L, MS[29]#34615L, MS[30]#34616L, MS[31]#34617L, MS[32]#34618L, MS[33]#34619L, MS[34]#34620L, MS[35]#34621L, MS[36]#34622L, MS[37]#34623L, MS[38]#34624L, MS[39]#34625L, MS[40]#34626L, MS[41]#34627L, MS[42]#34628L, MS[43]#34629L, MS[44]#34630L, MS[45]#34631L, MS[46]#34632L, MS[47]#34633L, MS[48]#34634L, MS[49]#34635L, MS[50]#34636L, MS[51]#34637L, sum#34752L, sum#34753, sum#34754, count#34755L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#34519, processing_day#34521, count#34751L, MS[0]#34586L, MS[1]#34587L, MS[2]#34588L, MS[3]#34589L, MS[4]#34590L, MS[5]#34591L, MS[6]#34592L, MS[7]#34593L, MS[8]#34594L, MS[9]#34595L, MS[10]#34596L, MS[11]#34597L, MS[12]#34598L, MS[13]#34599L, MS[14]#34600L, MS[15]#34601L, MS[16]#34602L, MS[17]#34603L, MS[18]#34604L, MS[19]#34605L, MS[20]#34606L, MS[21]#34607L, MS[22]#34608L, MS[23]#34609L, MS[24]#34610L, MS[25]#34611L, MS[26]#34612L, MS[27]#34613L, MS[28]#34614L, MS[29]#34615L, MS[30]#34616L, MS[31]#34617L, MS[32]#34618L, MS[33]#34619L, MS[34]#34620L, MS[35]#34621L, MS[36]#34622L, MS[37]#34623L, MS[38]#34624L, MS[39]#34625L, MS[40]#34626L, MS[41]#34627L, MS[42]#34628L, MS[43]#34629L, MS[44]#34630L, MS[45]#34631L, MS[46]#34632L, MS[47]#34633L, MS[48]#34634L, MS[49]#34635L, MS[50]#34636L, MS[51]#34637L, sum#34752L, sum#34753, sum#34754, count#34755L]
Keys [2]: [segment#34519, processing_day#34521]
Functions [5]: [count(1), approx_count_distinct(customer_id#34515L, 0.05, 0, 0), sum(events#34525), sum(weighted_amount#34527), avg(amount#34523)]
Aggregate Attributes [5]: [count(1)#34533L, approx_count_distinct(customer_id#34515L, 0.05, 0, 0)#34638L, sum(events#34525)#34639L, sum(weighted_amount#34527)#34640, avg(amount#34523)#34641]
Results [7]: [segment#34519, processing_day#34521, count(1)#34533L AS row_count#34528L, approx_count_distinct(customer_id#34515L, 0.05, 0, 0)#34638L AS unique_customers#34529L, sum(events#34525)#34639L AS event_sum#34530L, sum(weighted_amount#34527)#34640 AS weighted_amount_sum#34531, avg(amount#34523)#34641 AS avg_amount#34532]
(9) Exchange
Input [7]: [segment#34519, processing_day#34521, row_count#34528L, unique_customers#34529L, event_sum#34530L, weighted_amount_sum#34531, avg_amount#34532]
Arguments: rangepartitioning(segment#34519 ASC NULLS FIRST, processing_day#34521 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=3308]
(10) ShuffleQueryStage
Output [7]: [segment#34519, processing_day#34521, row_count#34528L, unique_customers#34529L, event_sum#34530L, weighted_amount_sum#34531, avg_amount#34532]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#34519, processing_day#34521, row_count#34528L, unique_customers#34529L, event_sum#34530L, weighted_amount_sum#34531, avg_amount#34532]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#34519, processing_day#34521, row_count#34528L, unique_customers#34529L, event_sum#34530L, weighted_amount_sum#34531, avg_amount#34532]
Arguments: [segment#34519 ASC NULLS FIRST, processing_day#34521 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#34519, processing_day#34521, row_count#34528L, unique_customers#34529L, event_sum#34530L, weighted_amount_sum#34531, avg_amount#34532]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#34515L, segment#34519, processing_day#34521, amount#34523, events#34525, weighted_amount#34527]
Keys [2]: [segment#34519, processing_day#34521]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#34515L, 0.05, 0, 0), partial_sum(events#34525), partial_sum(weighted_amount#34527), partial_avg(amount#34523)]
Aggregate Attributes [57]: [count#34746L, MS[0]#34534L, MS[1]#34535L, MS[2]#34536L, MS[3]#34537L, MS[4]#34538L, MS[5]#34539L, MS[6]#34540L, MS[7]#34541L, MS[8]#34542L, MS[9]#34543L, MS[10]#34544L, MS[11]#34545L, MS[12]#34546L, MS[13]#34547L, MS[14]#34548L, MS[15]#34549L, MS[16]#34550L, MS[17]#34551L, MS[18]#34552L, MS[19]#34553L, MS[20]#34554L, MS[21]#34555L, MS[22]#34556L, MS[23]#34557L, MS[24]#34558L, MS[25]#34559L, MS[26]#34560L, MS[27]#34561L, MS[28]#34562L, MS[29]#34563L, MS[30]#34564L, MS[31]#34565L, MS[32]#34566L, MS[33]#34567L, MS[34]#34568L, MS[35]#34569L, MS[36]#34570L, MS[37]#34571L, MS[38]#34572L, MS[39]#34573L, MS[40]#34574L, MS[41]#34575L, MS[42]#34576L, MS[43]#34577L, MS[44]#34578L, MS[45]#34579L, MS[46]#34580L, MS[47]#34581L, MS[48]#34582L, MS[49]#34583L, MS[50]#34584L, MS[51]#34585L, sum#34747L, sum#34748, sum#34749, count#34750L]
Results [59]: [segment#34519, processing_day#34521, count#34751L, MS[0]#34586L, MS[1]#34587L, MS[2]#34588L, MS[3]#34589L, MS[4]#34590L, MS[5]#34591L, MS[6]#34592L, MS[7]#34593L, MS[8]#34594L, MS[9]#34595L, MS[10]#34596L, MS[11]#34597L, MS[12]#34598L, MS[13]#34599L, MS[14]#34600L, MS[15]#34601L, MS[16]#34602L, MS[17]#34603L, MS[18]#34604L, MS[19]#34605L, MS[20]#34606L, MS[21]#34607L, MS[22]#34608L, MS[23]#34609L, MS[24]#34610L, MS[25]#34611L, MS[26]#34612L, MS[27]#34613L, MS[28]#34614L, MS[29]#34615L, MS[30]#34616L, MS[31]#34617L, MS[32]#34618L, MS[33]#34619L, MS[34]#34620L, MS[35]#34621L, MS[36]#34622L, MS[37]#34623L, MS[38]#34624L, MS[39]#34625L, MS[40]#34626L, MS[41]#34627L, MS[42]#34628L, MS[43]#34629L, MS[44]#34630L, MS[45]#34631L, MS[46]#34632L, MS[47]#34633L, MS[48]#34634L, MS[49]#34635L, MS[50]#34636L, MS[51]#34637L, sum#34752L, sum#34753, sum#34754, count#34755L]
(15) Exchange
Input [59]: [segment#34519, processing_day#34521, count#34751L, MS[0]#34586L, MS[1]#34587L, MS[2]#34588L, MS[3]#34589L, MS[4]#34590L, MS[5]#34591L, MS[6]#34592L, MS[7]#34593L, MS[8]#34594L, MS[9]#34595L, MS[10]#34596L, MS[11]#34597L, MS[12]#34598L, MS[13]#34599L, MS[14]#34600L, MS[15]#34601L, MS[16]#34602L, MS[17]#34603L, MS[18]#34604L, MS[19]#34605L, MS[20]#34606L, MS[21]#34607L, MS[22]#34608L, MS[23]#34609L, MS[24]#34610L, MS[25]#34611L, MS[26]#34612L, MS[27]#34613L, MS[28]#34614L, MS[29]#34615L, MS[30]#34616L, MS[31]#34617L, MS[32]#34618L, MS[33]#34619L, MS[34]#34620L, MS[35]#34621L, MS[36]#34622L, MS[37]#34623L, MS[38]#34624L, MS[39]#34625L, MS[40]#34626L, MS[41]#34627L, MS[42]#34628L, MS[43]#34629L, MS[44]#34630L, MS[45]#34631L, MS[46]#34632L, MS[47]#34633L, MS[48]#34634L, MS[49]#34635L, MS[50]#34636L, MS[51]#34637L, sum#34752L, sum#34753, sum#34754, count#34755L]
Arguments: hashpartitioning(segment#34519, processing_day#34521, 200), ENSURE_REQUIREMENTS, [plan_id=3266]
(16) HashAggregate
Input [59]: [segment#34519, processing_day#34521, count#34751L, MS[0]#34586L, MS[1]#34587L, MS[2]#34588L, MS[3]#34589L, MS[4]#34590L, MS[5]#34591L, MS[6]#34592L, MS[7]#34593L, MS[8]#34594L, MS[9]#34595L, MS[10]#34596L, MS[11]#34597L, MS[12]#34598L, MS[13]#34599L, MS[14]#34600L, MS[15]#34601L, MS[16]#34602L, MS[17]#34603L, MS[18]#34604L, MS[19]#34605L, MS[20]#34606L, MS[21]#34607L, MS[22]#34608L, MS[23]#34609L, MS[24]#34610L, MS[25]#34611L, MS[26]#34612L, MS[27]#34613L, MS[28]#34614L, MS[29]#34615L, MS[30]#34616L, MS[31]#34617L, MS[32]#34618L, MS[33]#34619L, MS[34]#34620L, MS[35]#34621L, MS[36]#34622L, MS[37]#34623L, MS[38]#34624L, MS[39]#34625L, MS[40]#34626L, MS[41]#34627L, MS[42]#34628L, MS[43]#34629L, MS[44]#34630L, MS[45]#34631L, MS[46]#34632L, MS[47]#34633L, MS[48]#34634L, MS[49]#34635L, MS[50]#34636L, MS[51]#34637L, sum#34752L, sum#34753, sum#34754, count#34755L]
Keys [2]: [segment#34519, processing_day#34521]
Functions [5]: [count(1), approx_count_distinct(customer_id#34515L, 0.05, 0, 0), sum(events#34525), sum(weighted_amount#34527), avg(amount#34523)]
Aggregate Attributes [5]: [count(1)#34533L, approx_count_distinct(customer_id#34515L, 0.05, 0, 0)#34638L, sum(events#34525)#34639L, sum(weighted_amount#34527)#34640, avg(amount#34523)#34641]
Results [7]: [segment#34519, processing_day#34521, count(1)#34533L AS row_count#34528L, approx_count_distinct(customer_id#34515L, 0.05, 0, 0)#34638L AS unique_customers#34529L, sum(events#34525)#34639L AS event_sum#34530L, sum(weighted_amount#34527)#34640 AS weighted_amount_sum#34531, avg(amount#34523)#34641 AS avg_amount#34532]
(17) Exchange
Input [7]: [segment#34519, processing_day#34521, row_count#34528L, unique_customers#34529L, event_sum#34530L, weighted_amount_sum#34531, avg_amount#34532]
Arguments: rangepartitioning(segment#34519 ASC NULLS FIRST, processing_day#34521 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=3269]
(18) Sort
Input [7]: [segment#34519, processing_day#34521, row_count#34528L, unique_customers#34529L, event_sum#34530L, weighted_amount_sum#34531, avg_amount#34532]
Arguments: [segment#34519 ASC NULLS FIRST, processing_day#34521 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#34519, processing_day#34521, row_count#34528L, unique_customers#34529L, event_sum#34530L, weighted_amount_sum#34531, avg_amount#34532]
Arguments: isFinalPlan=true