== 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#25673L]
Arguments: Range (5000000, 6000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#25673L % 250000) AS customer_id#25675L, concat(segment-, cast(cast((id#25673L % 12) as int) as string)) AS segment#25679, cast((id#25673L % 14) as int) AS processing_day#25681, ((cast(((id#25673L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#25683, cast((((id#25673L * 29) % 7) + 1) as int) AS events#25685]
Input [1]: [id#25673L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#25675L, segment#25679, processing_day#25681, amount#25683, events#25685, (amount#25683 * cast(events#25685 as double)) AS weighted_amount#25687]
Input [5]: [customer_id#25675L, segment#25679, processing_day#25681, amount#25683, events#25685]
(4) HashAggregate
Input [6]: [customer_id#25675L, segment#25679, processing_day#25681, amount#25683, events#25685, weighted_amount#25687]
Keys [2]: [segment#25679, processing_day#25681]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#25675L, 0.05, 0, 0), partial_sum(events#25685), partial_sum(weighted_amount#25687), partial_avg(amount#25683)]
Aggregate Attributes [57]: [count#25906L, MS[0]#25694L, MS[1]#25695L, MS[2]#25696L, MS[3]#25697L, MS[4]#25698L, MS[5]#25699L, MS[6]#25700L, MS[7]#25701L, MS[8]#25702L, MS[9]#25703L, MS[10]#25704L, MS[11]#25705L, MS[12]#25706L, MS[13]#25707L, MS[14]#25708L, MS[15]#25709L, MS[16]#25710L, MS[17]#25711L, MS[18]#25712L, MS[19]#25713L, MS[20]#25714L, MS[21]#25715L, MS[22]#25716L, MS[23]#25717L, MS[24]#25718L, MS[25]#25719L, MS[26]#25720L, MS[27]#25721L, MS[28]#25722L, MS[29]#25723L, MS[30]#25724L, MS[31]#25725L, MS[32]#25726L, MS[33]#25727L, MS[34]#25728L, MS[35]#25729L, MS[36]#25730L, MS[37]#25731L, MS[38]#25732L, MS[39]#25733L, MS[40]#25734L, MS[41]#25735L, MS[42]#25736L, MS[43]#25737L, MS[44]#25738L, MS[45]#25739L, MS[46]#25740L, MS[47]#25741L, MS[48]#25742L, MS[49]#25743L, MS[50]#25744L, MS[51]#25745L, sum#25907L, sum#25908, sum#25909, count#25910L]
Results [59]: [segment#25679, processing_day#25681, count#25911L, MS[0]#25746L, MS[1]#25747L, MS[2]#25748L, MS[3]#25749L, MS[4]#25750L, MS[5]#25751L, MS[6]#25752L, MS[7]#25753L, MS[8]#25754L, MS[9]#25755L, MS[10]#25756L, MS[11]#25757L, MS[12]#25758L, MS[13]#25759L, MS[14]#25760L, MS[15]#25761L, MS[16]#25762L, MS[17]#25763L, MS[18]#25764L, MS[19]#25765L, MS[20]#25766L, MS[21]#25767L, MS[22]#25768L, MS[23]#25769L, MS[24]#25770L, MS[25]#25771L, MS[26]#25772L, MS[27]#25773L, MS[28]#25774L, MS[29]#25775L, MS[30]#25776L, MS[31]#25777L, MS[32]#25778L, MS[33]#25779L, MS[34]#25780L, MS[35]#25781L, MS[36]#25782L, MS[37]#25783L, MS[38]#25784L, MS[39]#25785L, MS[40]#25786L, MS[41]#25787L, MS[42]#25788L, MS[43]#25789L, MS[44]#25790L, MS[45]#25791L, MS[46]#25792L, MS[47]#25793L, MS[48]#25794L, MS[49]#25795L, MS[50]#25796L, MS[51]#25797L, sum#25912L, sum#25913, sum#25914, count#25915L]
(5) Exchange
Input [59]: [segment#25679, processing_day#25681, count#25911L, MS[0]#25746L, MS[1]#25747L, MS[2]#25748L, MS[3]#25749L, MS[4]#25750L, MS[5]#25751L, MS[6]#25752L, MS[7]#25753L, MS[8]#25754L, MS[9]#25755L, MS[10]#25756L, MS[11]#25757L, MS[12]#25758L, MS[13]#25759L, MS[14]#25760L, MS[15]#25761L, MS[16]#25762L, MS[17]#25763L, MS[18]#25764L, MS[19]#25765L, MS[20]#25766L, MS[21]#25767L, MS[22]#25768L, MS[23]#25769L, MS[24]#25770L, MS[25]#25771L, MS[26]#25772L, MS[27]#25773L, MS[28]#25774L, MS[29]#25775L, MS[30]#25776L, MS[31]#25777L, MS[32]#25778L, MS[33]#25779L, MS[34]#25780L, MS[35]#25781L, MS[36]#25782L, MS[37]#25783L, MS[38]#25784L, MS[39]#25785L, MS[40]#25786L, MS[41]#25787L, MS[42]#25788L, MS[43]#25789L, MS[44]#25790L, MS[45]#25791L, MS[46]#25792L, MS[47]#25793L, MS[48]#25794L, MS[49]#25795L, MS[50]#25796L, MS[51]#25797L, sum#25912L, sum#25913, sum#25914, count#25915L]
Arguments: hashpartitioning(segment#25679, processing_day#25681, 200), ENSURE_REQUIREMENTS, [plan_id=2456]
(6) ShuffleQueryStage
Output [59]: [segment#25679, processing_day#25681, count#25911L, MS[0]#25746L, MS[1]#25747L, MS[2]#25748L, MS[3]#25749L, MS[4]#25750L, MS[5]#25751L, MS[6]#25752L, MS[7]#25753L, MS[8]#25754L, MS[9]#25755L, MS[10]#25756L, MS[11]#25757L, MS[12]#25758L, MS[13]#25759L, MS[14]#25760L, MS[15]#25761L, MS[16]#25762L, MS[17]#25763L, MS[18]#25764L, MS[19]#25765L, MS[20]#25766L, MS[21]#25767L, MS[22]#25768L, MS[23]#25769L, MS[24]#25770L, MS[25]#25771L, MS[26]#25772L, MS[27]#25773L, MS[28]#25774L, MS[29]#25775L, MS[30]#25776L, MS[31]#25777L, MS[32]#25778L, MS[33]#25779L, MS[34]#25780L, MS[35]#25781L, MS[36]#25782L, MS[37]#25783L, MS[38]#25784L, MS[39]#25785L, MS[40]#25786L, MS[41]#25787L, MS[42]#25788L, MS[43]#25789L, MS[44]#25790L, MS[45]#25791L, MS[46]#25792L, MS[47]#25793L, MS[48]#25794L, MS[49]#25795L, MS[50]#25796L, MS[51]#25797L, sum#25912L, sum#25913, sum#25914, count#25915L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#25679, processing_day#25681, count#25911L, MS[0]#25746L, MS[1]#25747L, MS[2]#25748L, MS[3]#25749L, MS[4]#25750L, MS[5]#25751L, MS[6]#25752L, MS[7]#25753L, MS[8]#25754L, MS[9]#25755L, MS[10]#25756L, MS[11]#25757L, MS[12]#25758L, MS[13]#25759L, MS[14]#25760L, MS[15]#25761L, MS[16]#25762L, MS[17]#25763L, MS[18]#25764L, MS[19]#25765L, MS[20]#25766L, MS[21]#25767L, MS[22]#25768L, MS[23]#25769L, MS[24]#25770L, MS[25]#25771L, MS[26]#25772L, MS[27]#25773L, MS[28]#25774L, MS[29]#25775L, MS[30]#25776L, MS[31]#25777L, MS[32]#25778L, MS[33]#25779L, MS[34]#25780L, MS[35]#25781L, MS[36]#25782L, MS[37]#25783L, MS[38]#25784L, MS[39]#25785L, MS[40]#25786L, MS[41]#25787L, MS[42]#25788L, MS[43]#25789L, MS[44]#25790L, MS[45]#25791L, MS[46]#25792L, MS[47]#25793L, MS[48]#25794L, MS[49]#25795L, MS[50]#25796L, MS[51]#25797L, sum#25912L, sum#25913, sum#25914, count#25915L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#25679, processing_day#25681, count#25911L, MS[0]#25746L, MS[1]#25747L, MS[2]#25748L, MS[3]#25749L, MS[4]#25750L, MS[5]#25751L, MS[6]#25752L, MS[7]#25753L, MS[8]#25754L, MS[9]#25755L, MS[10]#25756L, MS[11]#25757L, MS[12]#25758L, MS[13]#25759L, MS[14]#25760L, MS[15]#25761L, MS[16]#25762L, MS[17]#25763L, MS[18]#25764L, MS[19]#25765L, MS[20]#25766L, MS[21]#25767L, MS[22]#25768L, MS[23]#25769L, MS[24]#25770L, MS[25]#25771L, MS[26]#25772L, MS[27]#25773L, MS[28]#25774L, MS[29]#25775L, MS[30]#25776L, MS[31]#25777L, MS[32]#25778L, MS[33]#25779L, MS[34]#25780L, MS[35]#25781L, MS[36]#25782L, MS[37]#25783L, MS[38]#25784L, MS[39]#25785L, MS[40]#25786L, MS[41]#25787L, MS[42]#25788L, MS[43]#25789L, MS[44]#25790L, MS[45]#25791L, MS[46]#25792L, MS[47]#25793L, MS[48]#25794L, MS[49]#25795L, MS[50]#25796L, MS[51]#25797L, sum#25912L, sum#25913, sum#25914, count#25915L]
Keys [2]: [segment#25679, processing_day#25681]
Functions [5]: [count(1), approx_count_distinct(customer_id#25675L, 0.05, 0, 0), sum(events#25685), sum(weighted_amount#25687), avg(amount#25683)]
Aggregate Attributes [5]: [count(1)#25693L, approx_count_distinct(customer_id#25675L, 0.05, 0, 0)#25798L, sum(events#25685)#25799L, sum(weighted_amount#25687)#25800, avg(amount#25683)#25801]
Results [7]: [segment#25679, processing_day#25681, count(1)#25693L AS row_count#25688L, approx_count_distinct(customer_id#25675L, 0.05, 0, 0)#25798L AS unique_customers#25689L, sum(events#25685)#25799L AS event_sum#25690L, sum(weighted_amount#25687)#25800 AS weighted_amount_sum#25691, avg(amount#25683)#25801 AS avg_amount#25692]
(9) Exchange
Input [7]: [segment#25679, processing_day#25681, row_count#25688L, unique_customers#25689L, event_sum#25690L, weighted_amount_sum#25691, avg_amount#25692]
Arguments: rangepartitioning(segment#25679 ASC NULLS FIRST, processing_day#25681 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=2478]
(10) ShuffleQueryStage
Output [7]: [segment#25679, processing_day#25681, row_count#25688L, unique_customers#25689L, event_sum#25690L, weighted_amount_sum#25691, avg_amount#25692]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#25679, processing_day#25681, row_count#25688L, unique_customers#25689L, event_sum#25690L, weighted_amount_sum#25691, avg_amount#25692]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#25679, processing_day#25681, row_count#25688L, unique_customers#25689L, event_sum#25690L, weighted_amount_sum#25691, avg_amount#25692]
Arguments: [segment#25679 ASC NULLS FIRST, processing_day#25681 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#25679, processing_day#25681, row_count#25688L, unique_customers#25689L, event_sum#25690L, weighted_amount_sum#25691, avg_amount#25692]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#25675L, segment#25679, processing_day#25681, amount#25683, events#25685, weighted_amount#25687]
Keys [2]: [segment#25679, processing_day#25681]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#25675L, 0.05, 0, 0), partial_sum(events#25685), partial_sum(weighted_amount#25687), partial_avg(amount#25683)]
Aggregate Attributes [57]: [count#25906L, MS[0]#25694L, MS[1]#25695L, MS[2]#25696L, MS[3]#25697L, MS[4]#25698L, MS[5]#25699L, MS[6]#25700L, MS[7]#25701L, MS[8]#25702L, MS[9]#25703L, MS[10]#25704L, MS[11]#25705L, MS[12]#25706L, MS[13]#25707L, MS[14]#25708L, MS[15]#25709L, MS[16]#25710L, MS[17]#25711L, MS[18]#25712L, MS[19]#25713L, MS[20]#25714L, MS[21]#25715L, MS[22]#25716L, MS[23]#25717L, MS[24]#25718L, MS[25]#25719L, MS[26]#25720L, MS[27]#25721L, MS[28]#25722L, MS[29]#25723L, MS[30]#25724L, MS[31]#25725L, MS[32]#25726L, MS[33]#25727L, MS[34]#25728L, MS[35]#25729L, MS[36]#25730L, MS[37]#25731L, MS[38]#25732L, MS[39]#25733L, MS[40]#25734L, MS[41]#25735L, MS[42]#25736L, MS[43]#25737L, MS[44]#25738L, MS[45]#25739L, MS[46]#25740L, MS[47]#25741L, MS[48]#25742L, MS[49]#25743L, MS[50]#25744L, MS[51]#25745L, sum#25907L, sum#25908, sum#25909, count#25910L]
Results [59]: [segment#25679, processing_day#25681, count#25911L, MS[0]#25746L, MS[1]#25747L, MS[2]#25748L, MS[3]#25749L, MS[4]#25750L, MS[5]#25751L, MS[6]#25752L, MS[7]#25753L, MS[8]#25754L, MS[9]#25755L, MS[10]#25756L, MS[11]#25757L, MS[12]#25758L, MS[13]#25759L, MS[14]#25760L, MS[15]#25761L, MS[16]#25762L, MS[17]#25763L, MS[18]#25764L, MS[19]#25765L, MS[20]#25766L, MS[21]#25767L, MS[22]#25768L, MS[23]#25769L, MS[24]#25770L, MS[25]#25771L, MS[26]#25772L, MS[27]#25773L, MS[28]#25774L, MS[29]#25775L, MS[30]#25776L, MS[31]#25777L, MS[32]#25778L, MS[33]#25779L, MS[34]#25780L, MS[35]#25781L, MS[36]#25782L, MS[37]#25783L, MS[38]#25784L, MS[39]#25785L, MS[40]#25786L, MS[41]#25787L, MS[42]#25788L, MS[43]#25789L, MS[44]#25790L, MS[45]#25791L, MS[46]#25792L, MS[47]#25793L, MS[48]#25794L, MS[49]#25795L, MS[50]#25796L, MS[51]#25797L, sum#25912L, sum#25913, sum#25914, count#25915L]
(15) Exchange
Input [59]: [segment#25679, processing_day#25681, count#25911L, MS[0]#25746L, MS[1]#25747L, MS[2]#25748L, MS[3]#25749L, MS[4]#25750L, MS[5]#25751L, MS[6]#25752L, MS[7]#25753L, MS[8]#25754L, MS[9]#25755L, MS[10]#25756L, MS[11]#25757L, MS[12]#25758L, MS[13]#25759L, MS[14]#25760L, MS[15]#25761L, MS[16]#25762L, MS[17]#25763L, MS[18]#25764L, MS[19]#25765L, MS[20]#25766L, MS[21]#25767L, MS[22]#25768L, MS[23]#25769L, MS[24]#25770L, MS[25]#25771L, MS[26]#25772L, MS[27]#25773L, MS[28]#25774L, MS[29]#25775L, MS[30]#25776L, MS[31]#25777L, MS[32]#25778L, MS[33]#25779L, MS[34]#25780L, MS[35]#25781L, MS[36]#25782L, MS[37]#25783L, MS[38]#25784L, MS[39]#25785L, MS[40]#25786L, MS[41]#25787L, MS[42]#25788L, MS[43]#25789L, MS[44]#25790L, MS[45]#25791L, MS[46]#25792L, MS[47]#25793L, MS[48]#25794L, MS[49]#25795L, MS[50]#25796L, MS[51]#25797L, sum#25912L, sum#25913, sum#25914, count#25915L]
Arguments: hashpartitioning(segment#25679, processing_day#25681, 200), ENSURE_REQUIREMENTS, [plan_id=2436]
(16) HashAggregate
Input [59]: [segment#25679, processing_day#25681, count#25911L, MS[0]#25746L, MS[1]#25747L, MS[2]#25748L, MS[3]#25749L, MS[4]#25750L, MS[5]#25751L, MS[6]#25752L, MS[7]#25753L, MS[8]#25754L, MS[9]#25755L, MS[10]#25756L, MS[11]#25757L, MS[12]#25758L, MS[13]#25759L, MS[14]#25760L, MS[15]#25761L, MS[16]#25762L, MS[17]#25763L, MS[18]#25764L, MS[19]#25765L, MS[20]#25766L, MS[21]#25767L, MS[22]#25768L, MS[23]#25769L, MS[24]#25770L, MS[25]#25771L, MS[26]#25772L, MS[27]#25773L, MS[28]#25774L, MS[29]#25775L, MS[30]#25776L, MS[31]#25777L, MS[32]#25778L, MS[33]#25779L, MS[34]#25780L, MS[35]#25781L, MS[36]#25782L, MS[37]#25783L, MS[38]#25784L, MS[39]#25785L, MS[40]#25786L, MS[41]#25787L, MS[42]#25788L, MS[43]#25789L, MS[44]#25790L, MS[45]#25791L, MS[46]#25792L, MS[47]#25793L, MS[48]#25794L, MS[49]#25795L, MS[50]#25796L, MS[51]#25797L, sum#25912L, sum#25913, sum#25914, count#25915L]
Keys [2]: [segment#25679, processing_day#25681]
Functions [5]: [count(1), approx_count_distinct(customer_id#25675L, 0.05, 0, 0), sum(events#25685), sum(weighted_amount#25687), avg(amount#25683)]
Aggregate Attributes [5]: [count(1)#25693L, approx_count_distinct(customer_id#25675L, 0.05, 0, 0)#25798L, sum(events#25685)#25799L, sum(weighted_amount#25687)#25800, avg(amount#25683)#25801]
Results [7]: [segment#25679, processing_day#25681, count(1)#25693L AS row_count#25688L, approx_count_distinct(customer_id#25675L, 0.05, 0, 0)#25798L AS unique_customers#25689L, sum(events#25685)#25799L AS event_sum#25690L, sum(weighted_amount#25687)#25800 AS weighted_amount_sum#25691, avg(amount#25683)#25801 AS avg_amount#25692]
(17) Exchange
Input [7]: [segment#25679, processing_day#25681, row_count#25688L, unique_customers#25689L, event_sum#25690L, weighted_amount_sum#25691, avg_amount#25692]
Arguments: rangepartitioning(segment#25679 ASC NULLS FIRST, processing_day#25681 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=2439]
(18) Sort
Input [7]: [segment#25679, processing_day#25681, row_count#25688L, unique_customers#25689L, event_sum#25690L, weighted_amount_sum#25691, avg_amount#25692]
Arguments: [segment#25679 ASC NULLS FIRST, processing_day#25681 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#25679, processing_day#25681, row_count#25688L, unique_customers#25689L, event_sum#25690L, weighted_amount_sum#25691, avg_amount#25692]
Arguments: isFinalPlan=true