== 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#87655L]
Arguments: Range (3000000, 4000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#87655L % 250000) AS customer_id#87657L, concat(segment-, cast(cast((id#87655L % 12) as int) as string)) AS segment#87661, cast((id#87655L % 14) as int) AS processing_day#87663, ((cast(((id#87655L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#87665, cast((((id#87655L * 29) % 7) + 1) as int) AS events#87667]
Input [1]: [id#87655L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#87657L, segment#87661, processing_day#87663, amount#87665, events#87667, (amount#87665 * cast(events#87667 as double)) AS weighted_amount#87669]
Input [5]: [customer_id#87657L, segment#87661, processing_day#87663, amount#87665, events#87667]
(4) HashAggregate
Input [6]: [customer_id#87657L, segment#87661, processing_day#87663, amount#87665, events#87667, weighted_amount#87669]
Keys [2]: [segment#87661, processing_day#87663]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#87657L, 0.05, 0, 0), partial_sum(events#87667), partial_sum(weighted_amount#87669), partial_avg(amount#87665)]
Aggregate Attributes [57]: [count#87888L, MS[0]#87676L, MS[1]#87677L, MS[2]#87678L, MS[3]#87679L, MS[4]#87680L, MS[5]#87681L, MS[6]#87682L, MS[7]#87683L, MS[8]#87684L, MS[9]#87685L, MS[10]#87686L, MS[11]#87687L, MS[12]#87688L, MS[13]#87689L, MS[14]#87690L, MS[15]#87691L, MS[16]#87692L, MS[17]#87693L, MS[18]#87694L, MS[19]#87695L, MS[20]#87696L, MS[21]#87697L, MS[22]#87698L, MS[23]#87699L, MS[24]#87700L, MS[25]#87701L, MS[26]#87702L, MS[27]#87703L, MS[28]#87704L, MS[29]#87705L, MS[30]#87706L, MS[31]#87707L, MS[32]#87708L, MS[33]#87709L, MS[34]#87710L, MS[35]#87711L, MS[36]#87712L, MS[37]#87713L, MS[38]#87714L, MS[39]#87715L, MS[40]#87716L, MS[41]#87717L, MS[42]#87718L, MS[43]#87719L, MS[44]#87720L, MS[45]#87721L, MS[46]#87722L, MS[47]#87723L, MS[48]#87724L, MS[49]#87725L, MS[50]#87726L, MS[51]#87727L, sum#87889L, sum#87890, sum#87891, count#87892L]
Results [59]: [segment#87661, processing_day#87663, count#87893L, MS[0]#87728L, MS[1]#87729L, MS[2]#87730L, MS[3]#87731L, MS[4]#87732L, MS[5]#87733L, MS[6]#87734L, MS[7]#87735L, MS[8]#87736L, MS[9]#87737L, MS[10]#87738L, MS[11]#87739L, MS[12]#87740L, MS[13]#87741L, MS[14]#87742L, MS[15]#87743L, MS[16]#87744L, MS[17]#87745L, MS[18]#87746L, MS[19]#87747L, MS[20]#87748L, MS[21]#87749L, MS[22]#87750L, MS[23]#87751L, MS[24]#87752L, MS[25]#87753L, MS[26]#87754L, MS[27]#87755L, MS[28]#87756L, MS[29]#87757L, MS[30]#87758L, MS[31]#87759L, MS[32]#87760L, MS[33]#87761L, MS[34]#87762L, MS[35]#87763L, MS[36]#87764L, MS[37]#87765L, MS[38]#87766L, MS[39]#87767L, MS[40]#87768L, MS[41]#87769L, MS[42]#87770L, MS[43]#87771L, MS[44]#87772L, MS[45]#87773L, MS[46]#87774L, MS[47]#87775L, MS[48]#87776L, MS[49]#87777L, MS[50]#87778L, MS[51]#87779L, sum#87894L, sum#87895, sum#87896, count#87897L]
(5) Exchange
Input [59]: [segment#87661, processing_day#87663, count#87893L, MS[0]#87728L, MS[1]#87729L, MS[2]#87730L, MS[3]#87731L, MS[4]#87732L, MS[5]#87733L, MS[6]#87734L, MS[7]#87735L, MS[8]#87736L, MS[9]#87737L, MS[10]#87738L, MS[11]#87739L, MS[12]#87740L, MS[13]#87741L, MS[14]#87742L, MS[15]#87743L, MS[16]#87744L, MS[17]#87745L, MS[18]#87746L, MS[19]#87747L, MS[20]#87748L, MS[21]#87749L, MS[22]#87750L, MS[23]#87751L, MS[24]#87752L, MS[25]#87753L, MS[26]#87754L, MS[27]#87755L, MS[28]#87756L, MS[29]#87757L, MS[30]#87758L, MS[31]#87759L, MS[32]#87760L, MS[33]#87761L, MS[34]#87762L, MS[35]#87763L, MS[36]#87764L, MS[37]#87765L, MS[38]#87766L, MS[39]#87767L, MS[40]#87768L, MS[41]#87769L, MS[42]#87770L, MS[43]#87771L, MS[44]#87772L, MS[45]#87773L, MS[46]#87774L, MS[47]#87775L, MS[48]#87776L, MS[49]#87777L, MS[50]#87778L, MS[51]#87779L, sum#87894L, sum#87895, sum#87896, count#87897L]
Arguments: hashpartitioning(segment#87661, processing_day#87663, 200), ENSURE_REQUIREMENTS, [plan_id=8284]
(6) ShuffleQueryStage
Output [59]: [segment#87661, processing_day#87663, count#87893L, MS[0]#87728L, MS[1]#87729L, MS[2]#87730L, MS[3]#87731L, MS[4]#87732L, MS[5]#87733L, MS[6]#87734L, MS[7]#87735L, MS[8]#87736L, MS[9]#87737L, MS[10]#87738L, MS[11]#87739L, MS[12]#87740L, MS[13]#87741L, MS[14]#87742L, MS[15]#87743L, MS[16]#87744L, MS[17]#87745L, MS[18]#87746L, MS[19]#87747L, MS[20]#87748L, MS[21]#87749L, MS[22]#87750L, MS[23]#87751L, MS[24]#87752L, MS[25]#87753L, MS[26]#87754L, MS[27]#87755L, MS[28]#87756L, MS[29]#87757L, MS[30]#87758L, MS[31]#87759L, MS[32]#87760L, MS[33]#87761L, MS[34]#87762L, MS[35]#87763L, MS[36]#87764L, MS[37]#87765L, MS[38]#87766L, MS[39]#87767L, MS[40]#87768L, MS[41]#87769L, MS[42]#87770L, MS[43]#87771L, MS[44]#87772L, MS[45]#87773L, MS[46]#87774L, MS[47]#87775L, MS[48]#87776L, MS[49]#87777L, MS[50]#87778L, MS[51]#87779L, sum#87894L, sum#87895, sum#87896, count#87897L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#87661, processing_day#87663, count#87893L, MS[0]#87728L, MS[1]#87729L, MS[2]#87730L, MS[3]#87731L, MS[4]#87732L, MS[5]#87733L, MS[6]#87734L, MS[7]#87735L, MS[8]#87736L, MS[9]#87737L, MS[10]#87738L, MS[11]#87739L, MS[12]#87740L, MS[13]#87741L, MS[14]#87742L, MS[15]#87743L, MS[16]#87744L, MS[17]#87745L, MS[18]#87746L, MS[19]#87747L, MS[20]#87748L, MS[21]#87749L, MS[22]#87750L, MS[23]#87751L, MS[24]#87752L, MS[25]#87753L, MS[26]#87754L, MS[27]#87755L, MS[28]#87756L, MS[29]#87757L, MS[30]#87758L, MS[31]#87759L, MS[32]#87760L, MS[33]#87761L, MS[34]#87762L, MS[35]#87763L, MS[36]#87764L, MS[37]#87765L, MS[38]#87766L, MS[39]#87767L, MS[40]#87768L, MS[41]#87769L, MS[42]#87770L, MS[43]#87771L, MS[44]#87772L, MS[45]#87773L, MS[46]#87774L, MS[47]#87775L, MS[48]#87776L, MS[49]#87777L, MS[50]#87778L, MS[51]#87779L, sum#87894L, sum#87895, sum#87896, count#87897L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#87661, processing_day#87663, count#87893L, MS[0]#87728L, MS[1]#87729L, MS[2]#87730L, MS[3]#87731L, MS[4]#87732L, MS[5]#87733L, MS[6]#87734L, MS[7]#87735L, MS[8]#87736L, MS[9]#87737L, MS[10]#87738L, MS[11]#87739L, MS[12]#87740L, MS[13]#87741L, MS[14]#87742L, MS[15]#87743L, MS[16]#87744L, MS[17]#87745L, MS[18]#87746L, MS[19]#87747L, MS[20]#87748L, MS[21]#87749L, MS[22]#87750L, MS[23]#87751L, MS[24]#87752L, MS[25]#87753L, MS[26]#87754L, MS[27]#87755L, MS[28]#87756L, MS[29]#87757L, MS[30]#87758L, MS[31]#87759L, MS[32]#87760L, MS[33]#87761L, MS[34]#87762L, MS[35]#87763L, MS[36]#87764L, MS[37]#87765L, MS[38]#87766L, MS[39]#87767L, MS[40]#87768L, MS[41]#87769L, MS[42]#87770L, MS[43]#87771L, MS[44]#87772L, MS[45]#87773L, MS[46]#87774L, MS[47]#87775L, MS[48]#87776L, MS[49]#87777L, MS[50]#87778L, MS[51]#87779L, sum#87894L, sum#87895, sum#87896, count#87897L]
Keys [2]: [segment#87661, processing_day#87663]
Functions [5]: [count(1), approx_count_distinct(customer_id#87657L, 0.05, 0, 0), sum(events#87667), sum(weighted_amount#87669), avg(amount#87665)]
Aggregate Attributes [5]: [count(1)#87675L, approx_count_distinct(customer_id#87657L, 0.05, 0, 0)#87780L, sum(events#87667)#87781L, sum(weighted_amount#87669)#87782, avg(amount#87665)#87783]
Results [7]: [segment#87661, processing_day#87663, count(1)#87675L AS row_count#87670L, approx_count_distinct(customer_id#87657L, 0.05, 0, 0)#87780L AS unique_customers#87671L, sum(events#87667)#87781L AS event_sum#87672L, sum(weighted_amount#87669)#87782 AS weighted_amount_sum#87673, avg(amount#87665)#87783 AS avg_amount#87674]
(9) Exchange
Input [7]: [segment#87661, processing_day#87663, row_count#87670L, unique_customers#87671L, event_sum#87672L, weighted_amount_sum#87673, avg_amount#87674]
Arguments: rangepartitioning(segment#87661 ASC NULLS FIRST, processing_day#87663 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=8306]
(10) ShuffleQueryStage
Output [7]: [segment#87661, processing_day#87663, row_count#87670L, unique_customers#87671L, event_sum#87672L, weighted_amount_sum#87673, avg_amount#87674]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#87661, processing_day#87663, row_count#87670L, unique_customers#87671L, event_sum#87672L, weighted_amount_sum#87673, avg_amount#87674]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#87661, processing_day#87663, row_count#87670L, unique_customers#87671L, event_sum#87672L, weighted_amount_sum#87673, avg_amount#87674]
Arguments: [segment#87661 ASC NULLS FIRST, processing_day#87663 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#87661, processing_day#87663, row_count#87670L, unique_customers#87671L, event_sum#87672L, weighted_amount_sum#87673, avg_amount#87674]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#87657L, segment#87661, processing_day#87663, amount#87665, events#87667, weighted_amount#87669]
Keys [2]: [segment#87661, processing_day#87663]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#87657L, 0.05, 0, 0), partial_sum(events#87667), partial_sum(weighted_amount#87669), partial_avg(amount#87665)]
Aggregate Attributes [57]: [count#87888L, MS[0]#87676L, MS[1]#87677L, MS[2]#87678L, MS[3]#87679L, MS[4]#87680L, MS[5]#87681L, MS[6]#87682L, MS[7]#87683L, MS[8]#87684L, MS[9]#87685L, MS[10]#87686L, MS[11]#87687L, MS[12]#87688L, MS[13]#87689L, MS[14]#87690L, MS[15]#87691L, MS[16]#87692L, MS[17]#87693L, MS[18]#87694L, MS[19]#87695L, MS[20]#87696L, MS[21]#87697L, MS[22]#87698L, MS[23]#87699L, MS[24]#87700L, MS[25]#87701L, MS[26]#87702L, MS[27]#87703L, MS[28]#87704L, MS[29]#87705L, MS[30]#87706L, MS[31]#87707L, MS[32]#87708L, MS[33]#87709L, MS[34]#87710L, MS[35]#87711L, MS[36]#87712L, MS[37]#87713L, MS[38]#87714L, MS[39]#87715L, MS[40]#87716L, MS[41]#87717L, MS[42]#87718L, MS[43]#87719L, MS[44]#87720L, MS[45]#87721L, MS[46]#87722L, MS[47]#87723L, MS[48]#87724L, MS[49]#87725L, MS[50]#87726L, MS[51]#87727L, sum#87889L, sum#87890, sum#87891, count#87892L]
Results [59]: [segment#87661, processing_day#87663, count#87893L, MS[0]#87728L, MS[1]#87729L, MS[2]#87730L, MS[3]#87731L, MS[4]#87732L, MS[5]#87733L, MS[6]#87734L, MS[7]#87735L, MS[8]#87736L, MS[9]#87737L, MS[10]#87738L, MS[11]#87739L, MS[12]#87740L, MS[13]#87741L, MS[14]#87742L, MS[15]#87743L, MS[16]#87744L, MS[17]#87745L, MS[18]#87746L, MS[19]#87747L, MS[20]#87748L, MS[21]#87749L, MS[22]#87750L, MS[23]#87751L, MS[24]#87752L, MS[25]#87753L, MS[26]#87754L, MS[27]#87755L, MS[28]#87756L, MS[29]#87757L, MS[30]#87758L, MS[31]#87759L, MS[32]#87760L, MS[33]#87761L, MS[34]#87762L, MS[35]#87763L, MS[36]#87764L, MS[37]#87765L, MS[38]#87766L, MS[39]#87767L, MS[40]#87768L, MS[41]#87769L, MS[42]#87770L, MS[43]#87771L, MS[44]#87772L, MS[45]#87773L, MS[46]#87774L, MS[47]#87775L, MS[48]#87776L, MS[49]#87777L, MS[50]#87778L, MS[51]#87779L, sum#87894L, sum#87895, sum#87896, count#87897L]
(15) Exchange
Input [59]: [segment#87661, processing_day#87663, count#87893L, MS[0]#87728L, MS[1]#87729L, MS[2]#87730L, MS[3]#87731L, MS[4]#87732L, MS[5]#87733L, MS[6]#87734L, MS[7]#87735L, MS[8]#87736L, MS[9]#87737L, MS[10]#87738L, MS[11]#87739L, MS[12]#87740L, MS[13]#87741L, MS[14]#87742L, MS[15]#87743L, MS[16]#87744L, MS[17]#87745L, MS[18]#87746L, MS[19]#87747L, MS[20]#87748L, MS[21]#87749L, MS[22]#87750L, MS[23]#87751L, MS[24]#87752L, MS[25]#87753L, MS[26]#87754L, MS[27]#87755L, MS[28]#87756L, MS[29]#87757L, MS[30]#87758L, MS[31]#87759L, MS[32]#87760L, MS[33]#87761L, MS[34]#87762L, MS[35]#87763L, MS[36]#87764L, MS[37]#87765L, MS[38]#87766L, MS[39]#87767L, MS[40]#87768L, MS[41]#87769L, MS[42]#87770L, MS[43]#87771L, MS[44]#87772L, MS[45]#87773L, MS[46]#87774L, MS[47]#87775L, MS[48]#87776L, MS[49]#87777L, MS[50]#87778L, MS[51]#87779L, sum#87894L, sum#87895, sum#87896, count#87897L]
Arguments: hashpartitioning(segment#87661, processing_day#87663, 200), ENSURE_REQUIREMENTS, [plan_id=8264]
(16) HashAggregate
Input [59]: [segment#87661, processing_day#87663, count#87893L, MS[0]#87728L, MS[1]#87729L, MS[2]#87730L, MS[3]#87731L, MS[4]#87732L, MS[5]#87733L, MS[6]#87734L, MS[7]#87735L, MS[8]#87736L, MS[9]#87737L, MS[10]#87738L, MS[11]#87739L, MS[12]#87740L, MS[13]#87741L, MS[14]#87742L, MS[15]#87743L, MS[16]#87744L, MS[17]#87745L, MS[18]#87746L, MS[19]#87747L, MS[20]#87748L, MS[21]#87749L, MS[22]#87750L, MS[23]#87751L, MS[24]#87752L, MS[25]#87753L, MS[26]#87754L, MS[27]#87755L, MS[28]#87756L, MS[29]#87757L, MS[30]#87758L, MS[31]#87759L, MS[32]#87760L, MS[33]#87761L, MS[34]#87762L, MS[35]#87763L, MS[36]#87764L, MS[37]#87765L, MS[38]#87766L, MS[39]#87767L, MS[40]#87768L, MS[41]#87769L, MS[42]#87770L, MS[43]#87771L, MS[44]#87772L, MS[45]#87773L, MS[46]#87774L, MS[47]#87775L, MS[48]#87776L, MS[49]#87777L, MS[50]#87778L, MS[51]#87779L, sum#87894L, sum#87895, sum#87896, count#87897L]
Keys [2]: [segment#87661, processing_day#87663]
Functions [5]: [count(1), approx_count_distinct(customer_id#87657L, 0.05, 0, 0), sum(events#87667), sum(weighted_amount#87669), avg(amount#87665)]
Aggregate Attributes [5]: [count(1)#87675L, approx_count_distinct(customer_id#87657L, 0.05, 0, 0)#87780L, sum(events#87667)#87781L, sum(weighted_amount#87669)#87782, avg(amount#87665)#87783]
Results [7]: [segment#87661, processing_day#87663, count(1)#87675L AS row_count#87670L, approx_count_distinct(customer_id#87657L, 0.05, 0, 0)#87780L AS unique_customers#87671L, sum(events#87667)#87781L AS event_sum#87672L, sum(weighted_amount#87669)#87782 AS weighted_amount_sum#87673, avg(amount#87665)#87783 AS avg_amount#87674]
(17) Exchange
Input [7]: [segment#87661, processing_day#87663, row_count#87670L, unique_customers#87671L, event_sum#87672L, weighted_amount_sum#87673, avg_amount#87674]
Arguments: rangepartitioning(segment#87661 ASC NULLS FIRST, processing_day#87663 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=8267]
(18) Sort
Input [7]: [segment#87661, processing_day#87663, row_count#87670L, unique_customers#87671L, event_sum#87672L, weighted_amount_sum#87673, avg_amount#87674]
Arguments: [segment#87661 ASC NULLS FIRST, processing_day#87663 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#87661, processing_day#87663, row_count#87670L, unique_customers#87671L, event_sum#87672L, weighted_amount_sum#87673, avg_amount#87674]
Arguments: isFinalPlan=true