== 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#102683L]
Arguments: Range (20000000, 21000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#102683L % 250000) AS customer_id#102685L, concat(segment-, cast(cast((id#102683L % 12) as int) as string)) AS segment#102689, cast((id#102683L % 14) as int) AS processing_day#102691, ((cast(((id#102683L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#102693, cast((((id#102683L * 29) % 7) + 1) as int) AS events#102695]
Input [1]: [id#102683L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#102685L, segment#102689, processing_day#102691, amount#102693, events#102695, (amount#102693 * cast(events#102695 as double)) AS weighted_amount#102697]
Input [5]: [customer_id#102685L, segment#102689, processing_day#102691, amount#102693, events#102695]
(4) HashAggregate
Input [6]: [customer_id#102685L, segment#102689, processing_day#102691, amount#102693, events#102695, weighted_amount#102697]
Keys [2]: [segment#102689, processing_day#102691]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#102685L, 0.05, 0, 0), partial_sum(events#102695), partial_sum(weighted_amount#102697), partial_avg(amount#102693)]
Aggregate Attributes [57]: [count#102916L, MS[0]#102704L, MS[1]#102705L, MS[2]#102706L, MS[3]#102707L, MS[4]#102708L, MS[5]#102709L, MS[6]#102710L, MS[7]#102711L, MS[8]#102712L, MS[9]#102713L, MS[10]#102714L, MS[11]#102715L, MS[12]#102716L, MS[13]#102717L, MS[14]#102718L, MS[15]#102719L, MS[16]#102720L, MS[17]#102721L, MS[18]#102722L, MS[19]#102723L, MS[20]#102724L, MS[21]#102725L, MS[22]#102726L, MS[23]#102727L, MS[24]#102728L, MS[25]#102729L, MS[26]#102730L, MS[27]#102731L, MS[28]#102732L, MS[29]#102733L, MS[30]#102734L, MS[31]#102735L, MS[32]#102736L, MS[33]#102737L, MS[34]#102738L, MS[35]#102739L, MS[36]#102740L, MS[37]#102741L, MS[38]#102742L, MS[39]#102743L, MS[40]#102744L, MS[41]#102745L, MS[42]#102746L, MS[43]#102747L, MS[44]#102748L, MS[45]#102749L, MS[46]#102750L, MS[47]#102751L, MS[48]#102752L, MS[49]#102753L, MS[50]#102754L, MS[51]#102755L, sum#102917L, sum#102918, sum#102919, count#102920L]
Results [59]: [segment#102689, processing_day#102691, count#102921L, MS[0]#102756L, MS[1]#102757L, MS[2]#102758L, MS[3]#102759L, MS[4]#102760L, MS[5]#102761L, MS[6]#102762L, MS[7]#102763L, MS[8]#102764L, MS[9]#102765L, MS[10]#102766L, MS[11]#102767L, MS[12]#102768L, MS[13]#102769L, MS[14]#102770L, MS[15]#102771L, MS[16]#102772L, MS[17]#102773L, MS[18]#102774L, MS[19]#102775L, MS[20]#102776L, MS[21]#102777L, MS[22]#102778L, MS[23]#102779L, MS[24]#102780L, MS[25]#102781L, MS[26]#102782L, MS[27]#102783L, MS[28]#102784L, MS[29]#102785L, MS[30]#102786L, MS[31]#102787L, MS[32]#102788L, MS[33]#102789L, MS[34]#102790L, MS[35]#102791L, MS[36]#102792L, MS[37]#102793L, MS[38]#102794L, MS[39]#102795L, MS[40]#102796L, MS[41]#102797L, MS[42]#102798L, MS[43]#102799L, MS[44]#102800L, MS[45]#102801L, MS[46]#102802L, MS[47]#102803L, MS[48]#102804L, MS[49]#102805L, MS[50]#102806L, MS[51]#102807L, sum#102922L, sum#102923, sum#102924, count#102925L]
(5) Exchange
Input [59]: [segment#102689, processing_day#102691, count#102921L, MS[0]#102756L, MS[1]#102757L, MS[2]#102758L, MS[3]#102759L, MS[4]#102760L, MS[5]#102761L, MS[6]#102762L, MS[7]#102763L, MS[8]#102764L, MS[9]#102765L, MS[10]#102766L, MS[11]#102767L, MS[12]#102768L, MS[13]#102769L, MS[14]#102770L, MS[15]#102771L, MS[16]#102772L, MS[17]#102773L, MS[18]#102774L, MS[19]#102775L, MS[20]#102776L, MS[21]#102777L, MS[22]#102778L, MS[23]#102779L, MS[24]#102780L, MS[25]#102781L, MS[26]#102782L, MS[27]#102783L, MS[28]#102784L, MS[29]#102785L, MS[30]#102786L, MS[31]#102787L, MS[32]#102788L, MS[33]#102789L, MS[34]#102790L, MS[35]#102791L, MS[36]#102792L, MS[37]#102793L, MS[38]#102794L, MS[39]#102795L, MS[40]#102796L, MS[41]#102797L, MS[42]#102798L, MS[43]#102799L, MS[44]#102800L, MS[45]#102801L, MS[46]#102802L, MS[47]#102803L, MS[48]#102804L, MS[49]#102805L, MS[50]#102806L, MS[51]#102807L, sum#102922L, sum#102923, sum#102924, count#102925L]
Arguments: hashpartitioning(segment#102689, processing_day#102691, 200), ENSURE_REQUIREMENTS, [plan_id=9695]
(6) ShuffleQueryStage
Output [59]: [segment#102689, processing_day#102691, count#102921L, MS[0]#102756L, MS[1]#102757L, MS[2]#102758L, MS[3]#102759L, MS[4]#102760L, MS[5]#102761L, MS[6]#102762L, MS[7]#102763L, MS[8]#102764L, MS[9]#102765L, MS[10]#102766L, MS[11]#102767L, MS[12]#102768L, MS[13]#102769L, MS[14]#102770L, MS[15]#102771L, MS[16]#102772L, MS[17]#102773L, MS[18]#102774L, MS[19]#102775L, MS[20]#102776L, MS[21]#102777L, MS[22]#102778L, MS[23]#102779L, MS[24]#102780L, MS[25]#102781L, MS[26]#102782L, MS[27]#102783L, MS[28]#102784L, MS[29]#102785L, MS[30]#102786L, MS[31]#102787L, MS[32]#102788L, MS[33]#102789L, MS[34]#102790L, MS[35]#102791L, MS[36]#102792L, MS[37]#102793L, MS[38]#102794L, MS[39]#102795L, MS[40]#102796L, MS[41]#102797L, MS[42]#102798L, MS[43]#102799L, MS[44]#102800L, MS[45]#102801L, MS[46]#102802L, MS[47]#102803L, MS[48]#102804L, MS[49]#102805L, MS[50]#102806L, MS[51]#102807L, sum#102922L, sum#102923, sum#102924, count#102925L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#102689, processing_day#102691, count#102921L, MS[0]#102756L, MS[1]#102757L, MS[2]#102758L, MS[3]#102759L, MS[4]#102760L, MS[5]#102761L, MS[6]#102762L, MS[7]#102763L, MS[8]#102764L, MS[9]#102765L, MS[10]#102766L, MS[11]#102767L, MS[12]#102768L, MS[13]#102769L, MS[14]#102770L, MS[15]#102771L, MS[16]#102772L, MS[17]#102773L, MS[18]#102774L, MS[19]#102775L, MS[20]#102776L, MS[21]#102777L, MS[22]#102778L, MS[23]#102779L, MS[24]#102780L, MS[25]#102781L, MS[26]#102782L, MS[27]#102783L, MS[28]#102784L, MS[29]#102785L, MS[30]#102786L, MS[31]#102787L, MS[32]#102788L, MS[33]#102789L, MS[34]#102790L, MS[35]#102791L, MS[36]#102792L, MS[37]#102793L, MS[38]#102794L, MS[39]#102795L, MS[40]#102796L, MS[41]#102797L, MS[42]#102798L, MS[43]#102799L, MS[44]#102800L, MS[45]#102801L, MS[46]#102802L, MS[47]#102803L, MS[48]#102804L, MS[49]#102805L, MS[50]#102806L, MS[51]#102807L, sum#102922L, sum#102923, sum#102924, count#102925L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#102689, processing_day#102691, count#102921L, MS[0]#102756L, MS[1]#102757L, MS[2]#102758L, MS[3]#102759L, MS[4]#102760L, MS[5]#102761L, MS[6]#102762L, MS[7]#102763L, MS[8]#102764L, MS[9]#102765L, MS[10]#102766L, MS[11]#102767L, MS[12]#102768L, MS[13]#102769L, MS[14]#102770L, MS[15]#102771L, MS[16]#102772L, MS[17]#102773L, MS[18]#102774L, MS[19]#102775L, MS[20]#102776L, MS[21]#102777L, MS[22]#102778L, MS[23]#102779L, MS[24]#102780L, MS[25]#102781L, MS[26]#102782L, MS[27]#102783L, MS[28]#102784L, MS[29]#102785L, MS[30]#102786L, MS[31]#102787L, MS[32]#102788L, MS[33]#102789L, MS[34]#102790L, MS[35]#102791L, MS[36]#102792L, MS[37]#102793L, MS[38]#102794L, MS[39]#102795L, MS[40]#102796L, MS[41]#102797L, MS[42]#102798L, MS[43]#102799L, MS[44]#102800L, MS[45]#102801L, MS[46]#102802L, MS[47]#102803L, MS[48]#102804L, MS[49]#102805L, MS[50]#102806L, MS[51]#102807L, sum#102922L, sum#102923, sum#102924, count#102925L]
Keys [2]: [segment#102689, processing_day#102691]
Functions [5]: [count(1), approx_count_distinct(customer_id#102685L, 0.05, 0, 0), sum(events#102695), sum(weighted_amount#102697), avg(amount#102693)]
Aggregate Attributes [5]: [count(1)#102703L, approx_count_distinct(customer_id#102685L, 0.05, 0, 0)#102808L, sum(events#102695)#102809L, sum(weighted_amount#102697)#102810, avg(amount#102693)#102811]
Results [7]: [segment#102689, processing_day#102691, count(1)#102703L AS row_count#102698L, approx_count_distinct(customer_id#102685L, 0.05, 0, 0)#102808L AS unique_customers#102699L, sum(events#102695)#102809L AS event_sum#102700L, sum(weighted_amount#102697)#102810 AS weighted_amount_sum#102701, avg(amount#102693)#102811 AS avg_amount#102702]
(9) Exchange
Input [7]: [segment#102689, processing_day#102691, row_count#102698L, unique_customers#102699L, event_sum#102700L, weighted_amount_sum#102701, avg_amount#102702]
Arguments: rangepartitioning(segment#102689 ASC NULLS FIRST, processing_day#102691 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=9717]
(10) ShuffleQueryStage
Output [7]: [segment#102689, processing_day#102691, row_count#102698L, unique_customers#102699L, event_sum#102700L, weighted_amount_sum#102701, avg_amount#102702]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#102689, processing_day#102691, row_count#102698L, unique_customers#102699L, event_sum#102700L, weighted_amount_sum#102701, avg_amount#102702]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#102689, processing_day#102691, row_count#102698L, unique_customers#102699L, event_sum#102700L, weighted_amount_sum#102701, avg_amount#102702]
Arguments: [segment#102689 ASC NULLS FIRST, processing_day#102691 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#102689, processing_day#102691, row_count#102698L, unique_customers#102699L, event_sum#102700L, weighted_amount_sum#102701, avg_amount#102702]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#102685L, segment#102689, processing_day#102691, amount#102693, events#102695, weighted_amount#102697]
Keys [2]: [segment#102689, processing_day#102691]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#102685L, 0.05, 0, 0), partial_sum(events#102695), partial_sum(weighted_amount#102697), partial_avg(amount#102693)]
Aggregate Attributes [57]: [count#102916L, MS[0]#102704L, MS[1]#102705L, MS[2]#102706L, MS[3]#102707L, MS[4]#102708L, MS[5]#102709L, MS[6]#102710L, MS[7]#102711L, MS[8]#102712L, MS[9]#102713L, MS[10]#102714L, MS[11]#102715L, MS[12]#102716L, MS[13]#102717L, MS[14]#102718L, MS[15]#102719L, MS[16]#102720L, MS[17]#102721L, MS[18]#102722L, MS[19]#102723L, MS[20]#102724L, MS[21]#102725L, MS[22]#102726L, MS[23]#102727L, MS[24]#102728L, MS[25]#102729L, MS[26]#102730L, MS[27]#102731L, MS[28]#102732L, MS[29]#102733L, MS[30]#102734L, MS[31]#102735L, MS[32]#102736L, MS[33]#102737L, MS[34]#102738L, MS[35]#102739L, MS[36]#102740L, MS[37]#102741L, MS[38]#102742L, MS[39]#102743L, MS[40]#102744L, MS[41]#102745L, MS[42]#102746L, MS[43]#102747L, MS[44]#102748L, MS[45]#102749L, MS[46]#102750L, MS[47]#102751L, MS[48]#102752L, MS[49]#102753L, MS[50]#102754L, MS[51]#102755L, sum#102917L, sum#102918, sum#102919, count#102920L]
Results [59]: [segment#102689, processing_day#102691, count#102921L, MS[0]#102756L, MS[1]#102757L, MS[2]#102758L, MS[3]#102759L, MS[4]#102760L, MS[5]#102761L, MS[6]#102762L, MS[7]#102763L, MS[8]#102764L, MS[9]#102765L, MS[10]#102766L, MS[11]#102767L, MS[12]#102768L, MS[13]#102769L, MS[14]#102770L, MS[15]#102771L, MS[16]#102772L, MS[17]#102773L, MS[18]#102774L, MS[19]#102775L, MS[20]#102776L, MS[21]#102777L, MS[22]#102778L, MS[23]#102779L, MS[24]#102780L, MS[25]#102781L, MS[26]#102782L, MS[27]#102783L, MS[28]#102784L, MS[29]#102785L, MS[30]#102786L, MS[31]#102787L, MS[32]#102788L, MS[33]#102789L, MS[34]#102790L, MS[35]#102791L, MS[36]#102792L, MS[37]#102793L, MS[38]#102794L, MS[39]#102795L, MS[40]#102796L, MS[41]#102797L, MS[42]#102798L, MS[43]#102799L, MS[44]#102800L, MS[45]#102801L, MS[46]#102802L, MS[47]#102803L, MS[48]#102804L, MS[49]#102805L, MS[50]#102806L, MS[51]#102807L, sum#102922L, sum#102923, sum#102924, count#102925L]
(15) Exchange
Input [59]: [segment#102689, processing_day#102691, count#102921L, MS[0]#102756L, MS[1]#102757L, MS[2]#102758L, MS[3]#102759L, MS[4]#102760L, MS[5]#102761L, MS[6]#102762L, MS[7]#102763L, MS[8]#102764L, MS[9]#102765L, MS[10]#102766L, MS[11]#102767L, MS[12]#102768L, MS[13]#102769L, MS[14]#102770L, MS[15]#102771L, MS[16]#102772L, MS[17]#102773L, MS[18]#102774L, MS[19]#102775L, MS[20]#102776L, MS[21]#102777L, MS[22]#102778L, MS[23]#102779L, MS[24]#102780L, MS[25]#102781L, MS[26]#102782L, MS[27]#102783L, MS[28]#102784L, MS[29]#102785L, MS[30]#102786L, MS[31]#102787L, MS[32]#102788L, MS[33]#102789L, MS[34]#102790L, MS[35]#102791L, MS[36]#102792L, MS[37]#102793L, MS[38]#102794L, MS[39]#102795L, MS[40]#102796L, MS[41]#102797L, MS[42]#102798L, MS[43]#102799L, MS[44]#102800L, MS[45]#102801L, MS[46]#102802L, MS[47]#102803L, MS[48]#102804L, MS[49]#102805L, MS[50]#102806L, MS[51]#102807L, sum#102922L, sum#102923, sum#102924, count#102925L]
Arguments: hashpartitioning(segment#102689, processing_day#102691, 200), ENSURE_REQUIREMENTS, [plan_id=9675]
(16) HashAggregate
Input [59]: [segment#102689, processing_day#102691, count#102921L, MS[0]#102756L, MS[1]#102757L, MS[2]#102758L, MS[3]#102759L, MS[4]#102760L, MS[5]#102761L, MS[6]#102762L, MS[7]#102763L, MS[8]#102764L, MS[9]#102765L, MS[10]#102766L, MS[11]#102767L, MS[12]#102768L, MS[13]#102769L, MS[14]#102770L, MS[15]#102771L, MS[16]#102772L, MS[17]#102773L, MS[18]#102774L, MS[19]#102775L, MS[20]#102776L, MS[21]#102777L, MS[22]#102778L, MS[23]#102779L, MS[24]#102780L, MS[25]#102781L, MS[26]#102782L, MS[27]#102783L, MS[28]#102784L, MS[29]#102785L, MS[30]#102786L, MS[31]#102787L, MS[32]#102788L, MS[33]#102789L, MS[34]#102790L, MS[35]#102791L, MS[36]#102792L, MS[37]#102793L, MS[38]#102794L, MS[39]#102795L, MS[40]#102796L, MS[41]#102797L, MS[42]#102798L, MS[43]#102799L, MS[44]#102800L, MS[45]#102801L, MS[46]#102802L, MS[47]#102803L, MS[48]#102804L, MS[49]#102805L, MS[50]#102806L, MS[51]#102807L, sum#102922L, sum#102923, sum#102924, count#102925L]
Keys [2]: [segment#102689, processing_day#102691]
Functions [5]: [count(1), approx_count_distinct(customer_id#102685L, 0.05, 0, 0), sum(events#102695), sum(weighted_amount#102697), avg(amount#102693)]
Aggregate Attributes [5]: [count(1)#102703L, approx_count_distinct(customer_id#102685L, 0.05, 0, 0)#102808L, sum(events#102695)#102809L, sum(weighted_amount#102697)#102810, avg(amount#102693)#102811]
Results [7]: [segment#102689, processing_day#102691, count(1)#102703L AS row_count#102698L, approx_count_distinct(customer_id#102685L, 0.05, 0, 0)#102808L AS unique_customers#102699L, sum(events#102695)#102809L AS event_sum#102700L, sum(weighted_amount#102697)#102810 AS weighted_amount_sum#102701, avg(amount#102693)#102811 AS avg_amount#102702]
(17) Exchange
Input [7]: [segment#102689, processing_day#102691, row_count#102698L, unique_customers#102699L, event_sum#102700L, weighted_amount_sum#102701, avg_amount#102702]
Arguments: rangepartitioning(segment#102689 ASC NULLS FIRST, processing_day#102691 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=9678]
(18) Sort
Input [7]: [segment#102689, processing_day#102691, row_count#102698L, unique_customers#102699L, event_sum#102700L, weighted_amount_sum#102701, avg_amount#102702]
Arguments: [segment#102689 ASC NULLS FIRST, processing_day#102691 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#102689, processing_day#102691, row_count#102698L, unique_customers#102699L, event_sum#102700L, weighted_amount_sum#102701, avg_amount#102702]
Arguments: isFinalPlan=true