== 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#48691L]
Arguments: Range (7000000, 8000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#48691L % 250000) AS customer_id#48693L, concat(segment-, cast(cast((id#48691L % 12) as int) as string)) AS segment#48697, cast((id#48691L % 14) as int) AS processing_day#48699, ((cast(((id#48691L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#48701, cast((((id#48691L * 29) % 7) + 1) as int) AS events#48703]
Input [1]: [id#48691L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#48693L, segment#48697, processing_day#48699, amount#48701, events#48703, (amount#48701 * cast(events#48703 as double)) AS weighted_amount#48705]
Input [5]: [customer_id#48693L, segment#48697, processing_day#48699, amount#48701, events#48703]
(4) HashAggregate
Input [6]: [customer_id#48693L, segment#48697, processing_day#48699, amount#48701, events#48703, weighted_amount#48705]
Keys [2]: [segment#48697, processing_day#48699]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#48693L, 0.05, 0, 0), partial_sum(events#48703), partial_sum(weighted_amount#48705), partial_avg(amount#48701)]
Aggregate Attributes [57]: [count#48924L, MS[0]#48712L, MS[1]#48713L, MS[2]#48714L, MS[3]#48715L, MS[4]#48716L, MS[5]#48717L, MS[6]#48718L, MS[7]#48719L, MS[8]#48720L, MS[9]#48721L, MS[10]#48722L, MS[11]#48723L, MS[12]#48724L, MS[13]#48725L, MS[14]#48726L, MS[15]#48727L, MS[16]#48728L, MS[17]#48729L, MS[18]#48730L, MS[19]#48731L, MS[20]#48732L, MS[21]#48733L, MS[22]#48734L, MS[23]#48735L, MS[24]#48736L, MS[25]#48737L, MS[26]#48738L, MS[27]#48739L, MS[28]#48740L, MS[29]#48741L, MS[30]#48742L, MS[31]#48743L, MS[32]#48744L, MS[33]#48745L, MS[34]#48746L, MS[35]#48747L, MS[36]#48748L, MS[37]#48749L, MS[38]#48750L, MS[39]#48751L, MS[40]#48752L, MS[41]#48753L, MS[42]#48754L, MS[43]#48755L, MS[44]#48756L, MS[45]#48757L, MS[46]#48758L, MS[47]#48759L, MS[48]#48760L, MS[49]#48761L, MS[50]#48762L, MS[51]#48763L, sum#48925L, sum#48926, sum#48927, count#48928L]
Results [59]: [segment#48697, processing_day#48699, count#48929L, MS[0]#48764L, MS[1]#48765L, MS[2]#48766L, MS[3]#48767L, MS[4]#48768L, MS[5]#48769L, MS[6]#48770L, MS[7]#48771L, MS[8]#48772L, MS[9]#48773L, MS[10]#48774L, MS[11]#48775L, MS[12]#48776L, MS[13]#48777L, MS[14]#48778L, MS[15]#48779L, MS[16]#48780L, MS[17]#48781L, MS[18]#48782L, MS[19]#48783L, MS[20]#48784L, MS[21]#48785L, MS[22]#48786L, MS[23]#48787L, MS[24]#48788L, MS[25]#48789L, MS[26]#48790L, MS[27]#48791L, MS[28]#48792L, MS[29]#48793L, MS[30]#48794L, MS[31]#48795L, MS[32]#48796L, MS[33]#48797L, MS[34]#48798L, MS[35]#48799L, MS[36]#48800L, MS[37]#48801L, MS[38]#48802L, MS[39]#48803L, MS[40]#48804L, MS[41]#48805L, MS[42]#48806L, MS[43]#48807L, MS[44]#48808L, MS[45]#48809L, MS[46]#48810L, MS[47]#48811L, MS[48]#48812L, MS[49]#48813L, MS[50]#48814L, MS[51]#48815L, sum#48930L, sum#48931, sum#48932, count#48933L]
(5) Exchange
Input [59]: [segment#48697, processing_day#48699, count#48929L, MS[0]#48764L, MS[1]#48765L, MS[2]#48766L, MS[3]#48767L, MS[4]#48768L, MS[5]#48769L, MS[6]#48770L, MS[7]#48771L, MS[8]#48772L, MS[9]#48773L, MS[10]#48774L, MS[11]#48775L, MS[12]#48776L, MS[13]#48777L, MS[14]#48778L, MS[15]#48779L, MS[16]#48780L, MS[17]#48781L, MS[18]#48782L, MS[19]#48783L, MS[20]#48784L, MS[21]#48785L, MS[22]#48786L, MS[23]#48787L, MS[24]#48788L, MS[25]#48789L, MS[26]#48790L, MS[27]#48791L, MS[28]#48792L, MS[29]#48793L, MS[30]#48794L, MS[31]#48795L, MS[32]#48796L, MS[33]#48797L, MS[34]#48798L, MS[35]#48799L, MS[36]#48800L, MS[37]#48801L, MS[38]#48802L, MS[39]#48803L, MS[40]#48804L, MS[41]#48805L, MS[42]#48806L, MS[43]#48807L, MS[44]#48808L, MS[45]#48809L, MS[46]#48810L, MS[47]#48811L, MS[48]#48812L, MS[49]#48813L, MS[50]#48814L, MS[51]#48815L, sum#48930L, sum#48931, sum#48932, count#48933L]
Arguments: hashpartitioning(segment#48697, processing_day#48699, 200), ENSURE_REQUIREMENTS, [plan_id=4620]
(6) ShuffleQueryStage
Output [59]: [segment#48697, processing_day#48699, count#48929L, MS[0]#48764L, MS[1]#48765L, MS[2]#48766L, MS[3]#48767L, MS[4]#48768L, MS[5]#48769L, MS[6]#48770L, MS[7]#48771L, MS[8]#48772L, MS[9]#48773L, MS[10]#48774L, MS[11]#48775L, MS[12]#48776L, MS[13]#48777L, MS[14]#48778L, MS[15]#48779L, MS[16]#48780L, MS[17]#48781L, MS[18]#48782L, MS[19]#48783L, MS[20]#48784L, MS[21]#48785L, MS[22]#48786L, MS[23]#48787L, MS[24]#48788L, MS[25]#48789L, MS[26]#48790L, MS[27]#48791L, MS[28]#48792L, MS[29]#48793L, MS[30]#48794L, MS[31]#48795L, MS[32]#48796L, MS[33]#48797L, MS[34]#48798L, MS[35]#48799L, MS[36]#48800L, MS[37]#48801L, MS[38]#48802L, MS[39]#48803L, MS[40]#48804L, MS[41]#48805L, MS[42]#48806L, MS[43]#48807L, MS[44]#48808L, MS[45]#48809L, MS[46]#48810L, MS[47]#48811L, MS[48]#48812L, MS[49]#48813L, MS[50]#48814L, MS[51]#48815L, sum#48930L, sum#48931, sum#48932, count#48933L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#48697, processing_day#48699, count#48929L, MS[0]#48764L, MS[1]#48765L, MS[2]#48766L, MS[3]#48767L, MS[4]#48768L, MS[5]#48769L, MS[6]#48770L, MS[7]#48771L, MS[8]#48772L, MS[9]#48773L, MS[10]#48774L, MS[11]#48775L, MS[12]#48776L, MS[13]#48777L, MS[14]#48778L, MS[15]#48779L, MS[16]#48780L, MS[17]#48781L, MS[18]#48782L, MS[19]#48783L, MS[20]#48784L, MS[21]#48785L, MS[22]#48786L, MS[23]#48787L, MS[24]#48788L, MS[25]#48789L, MS[26]#48790L, MS[27]#48791L, MS[28]#48792L, MS[29]#48793L, MS[30]#48794L, MS[31]#48795L, MS[32]#48796L, MS[33]#48797L, MS[34]#48798L, MS[35]#48799L, MS[36]#48800L, MS[37]#48801L, MS[38]#48802L, MS[39]#48803L, MS[40]#48804L, MS[41]#48805L, MS[42]#48806L, MS[43]#48807L, MS[44]#48808L, MS[45]#48809L, MS[46]#48810L, MS[47]#48811L, MS[48]#48812L, MS[49]#48813L, MS[50]#48814L, MS[51]#48815L, sum#48930L, sum#48931, sum#48932, count#48933L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#48697, processing_day#48699, count#48929L, MS[0]#48764L, MS[1]#48765L, MS[2]#48766L, MS[3]#48767L, MS[4]#48768L, MS[5]#48769L, MS[6]#48770L, MS[7]#48771L, MS[8]#48772L, MS[9]#48773L, MS[10]#48774L, MS[11]#48775L, MS[12]#48776L, MS[13]#48777L, MS[14]#48778L, MS[15]#48779L, MS[16]#48780L, MS[17]#48781L, MS[18]#48782L, MS[19]#48783L, MS[20]#48784L, MS[21]#48785L, MS[22]#48786L, MS[23]#48787L, MS[24]#48788L, MS[25]#48789L, MS[26]#48790L, MS[27]#48791L, MS[28]#48792L, MS[29]#48793L, MS[30]#48794L, MS[31]#48795L, MS[32]#48796L, MS[33]#48797L, MS[34]#48798L, MS[35]#48799L, MS[36]#48800L, MS[37]#48801L, MS[38]#48802L, MS[39]#48803L, MS[40]#48804L, MS[41]#48805L, MS[42]#48806L, MS[43]#48807L, MS[44]#48808L, MS[45]#48809L, MS[46]#48810L, MS[47]#48811L, MS[48]#48812L, MS[49]#48813L, MS[50]#48814L, MS[51]#48815L, sum#48930L, sum#48931, sum#48932, count#48933L]
Keys [2]: [segment#48697, processing_day#48699]
Functions [5]: [count(1), approx_count_distinct(customer_id#48693L, 0.05, 0, 0), sum(events#48703), sum(weighted_amount#48705), avg(amount#48701)]
Aggregate Attributes [5]: [count(1)#48711L, approx_count_distinct(customer_id#48693L, 0.05, 0, 0)#48816L, sum(events#48703)#48817L, sum(weighted_amount#48705)#48818, avg(amount#48701)#48819]
Results [7]: [segment#48697, processing_day#48699, count(1)#48711L AS row_count#48706L, approx_count_distinct(customer_id#48693L, 0.05, 0, 0)#48816L AS unique_customers#48707L, sum(events#48703)#48817L AS event_sum#48708L, sum(weighted_amount#48705)#48818 AS weighted_amount_sum#48709, avg(amount#48701)#48819 AS avg_amount#48710]
(9) Exchange
Input [7]: [segment#48697, processing_day#48699, row_count#48706L, unique_customers#48707L, event_sum#48708L, weighted_amount_sum#48709, avg_amount#48710]
Arguments: rangepartitioning(segment#48697 ASC NULLS FIRST, processing_day#48699 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=4642]
(10) ShuffleQueryStage
Output [7]: [segment#48697, processing_day#48699, row_count#48706L, unique_customers#48707L, event_sum#48708L, weighted_amount_sum#48709, avg_amount#48710]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#48697, processing_day#48699, row_count#48706L, unique_customers#48707L, event_sum#48708L, weighted_amount_sum#48709, avg_amount#48710]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#48697, processing_day#48699, row_count#48706L, unique_customers#48707L, event_sum#48708L, weighted_amount_sum#48709, avg_amount#48710]
Arguments: [segment#48697 ASC NULLS FIRST, processing_day#48699 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#48697, processing_day#48699, row_count#48706L, unique_customers#48707L, event_sum#48708L, weighted_amount_sum#48709, avg_amount#48710]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#48693L, segment#48697, processing_day#48699, amount#48701, events#48703, weighted_amount#48705]
Keys [2]: [segment#48697, processing_day#48699]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#48693L, 0.05, 0, 0), partial_sum(events#48703), partial_sum(weighted_amount#48705), partial_avg(amount#48701)]
Aggregate Attributes [57]: [count#48924L, MS[0]#48712L, MS[1]#48713L, MS[2]#48714L, MS[3]#48715L, MS[4]#48716L, MS[5]#48717L, MS[6]#48718L, MS[7]#48719L, MS[8]#48720L, MS[9]#48721L, MS[10]#48722L, MS[11]#48723L, MS[12]#48724L, MS[13]#48725L, MS[14]#48726L, MS[15]#48727L, MS[16]#48728L, MS[17]#48729L, MS[18]#48730L, MS[19]#48731L, MS[20]#48732L, MS[21]#48733L, MS[22]#48734L, MS[23]#48735L, MS[24]#48736L, MS[25]#48737L, MS[26]#48738L, MS[27]#48739L, MS[28]#48740L, MS[29]#48741L, MS[30]#48742L, MS[31]#48743L, MS[32]#48744L, MS[33]#48745L, MS[34]#48746L, MS[35]#48747L, MS[36]#48748L, MS[37]#48749L, MS[38]#48750L, MS[39]#48751L, MS[40]#48752L, MS[41]#48753L, MS[42]#48754L, MS[43]#48755L, MS[44]#48756L, MS[45]#48757L, MS[46]#48758L, MS[47]#48759L, MS[48]#48760L, MS[49]#48761L, MS[50]#48762L, MS[51]#48763L, sum#48925L, sum#48926, sum#48927, count#48928L]
Results [59]: [segment#48697, processing_day#48699, count#48929L, MS[0]#48764L, MS[1]#48765L, MS[2]#48766L, MS[3]#48767L, MS[4]#48768L, MS[5]#48769L, MS[6]#48770L, MS[7]#48771L, MS[8]#48772L, MS[9]#48773L, MS[10]#48774L, MS[11]#48775L, MS[12]#48776L, MS[13]#48777L, MS[14]#48778L, MS[15]#48779L, MS[16]#48780L, MS[17]#48781L, MS[18]#48782L, MS[19]#48783L, MS[20]#48784L, MS[21]#48785L, MS[22]#48786L, MS[23]#48787L, MS[24]#48788L, MS[25]#48789L, MS[26]#48790L, MS[27]#48791L, MS[28]#48792L, MS[29]#48793L, MS[30]#48794L, MS[31]#48795L, MS[32]#48796L, MS[33]#48797L, MS[34]#48798L, MS[35]#48799L, MS[36]#48800L, MS[37]#48801L, MS[38]#48802L, MS[39]#48803L, MS[40]#48804L, MS[41]#48805L, MS[42]#48806L, MS[43]#48807L, MS[44]#48808L, MS[45]#48809L, MS[46]#48810L, MS[47]#48811L, MS[48]#48812L, MS[49]#48813L, MS[50]#48814L, MS[51]#48815L, sum#48930L, sum#48931, sum#48932, count#48933L]
(15) Exchange
Input [59]: [segment#48697, processing_day#48699, count#48929L, MS[0]#48764L, MS[1]#48765L, MS[2]#48766L, MS[3]#48767L, MS[4]#48768L, MS[5]#48769L, MS[6]#48770L, MS[7]#48771L, MS[8]#48772L, MS[9]#48773L, MS[10]#48774L, MS[11]#48775L, MS[12]#48776L, MS[13]#48777L, MS[14]#48778L, MS[15]#48779L, MS[16]#48780L, MS[17]#48781L, MS[18]#48782L, MS[19]#48783L, MS[20]#48784L, MS[21]#48785L, MS[22]#48786L, MS[23]#48787L, MS[24]#48788L, MS[25]#48789L, MS[26]#48790L, MS[27]#48791L, MS[28]#48792L, MS[29]#48793L, MS[30]#48794L, MS[31]#48795L, MS[32]#48796L, MS[33]#48797L, MS[34]#48798L, MS[35]#48799L, MS[36]#48800L, MS[37]#48801L, MS[38]#48802L, MS[39]#48803L, MS[40]#48804L, MS[41]#48805L, MS[42]#48806L, MS[43]#48807L, MS[44]#48808L, MS[45]#48809L, MS[46]#48810L, MS[47]#48811L, MS[48]#48812L, MS[49]#48813L, MS[50]#48814L, MS[51]#48815L, sum#48930L, sum#48931, sum#48932, count#48933L]
Arguments: hashpartitioning(segment#48697, processing_day#48699, 200), ENSURE_REQUIREMENTS, [plan_id=4600]
(16) HashAggregate
Input [59]: [segment#48697, processing_day#48699, count#48929L, MS[0]#48764L, MS[1]#48765L, MS[2]#48766L, MS[3]#48767L, MS[4]#48768L, MS[5]#48769L, MS[6]#48770L, MS[7]#48771L, MS[8]#48772L, MS[9]#48773L, MS[10]#48774L, MS[11]#48775L, MS[12]#48776L, MS[13]#48777L, MS[14]#48778L, MS[15]#48779L, MS[16]#48780L, MS[17]#48781L, MS[18]#48782L, MS[19]#48783L, MS[20]#48784L, MS[21]#48785L, MS[22]#48786L, MS[23]#48787L, MS[24]#48788L, MS[25]#48789L, MS[26]#48790L, MS[27]#48791L, MS[28]#48792L, MS[29]#48793L, MS[30]#48794L, MS[31]#48795L, MS[32]#48796L, MS[33]#48797L, MS[34]#48798L, MS[35]#48799L, MS[36]#48800L, MS[37]#48801L, MS[38]#48802L, MS[39]#48803L, MS[40]#48804L, MS[41]#48805L, MS[42]#48806L, MS[43]#48807L, MS[44]#48808L, MS[45]#48809L, MS[46]#48810L, MS[47]#48811L, MS[48]#48812L, MS[49]#48813L, MS[50]#48814L, MS[51]#48815L, sum#48930L, sum#48931, sum#48932, count#48933L]
Keys [2]: [segment#48697, processing_day#48699]
Functions [5]: [count(1), approx_count_distinct(customer_id#48693L, 0.05, 0, 0), sum(events#48703), sum(weighted_amount#48705), avg(amount#48701)]
Aggregate Attributes [5]: [count(1)#48711L, approx_count_distinct(customer_id#48693L, 0.05, 0, 0)#48816L, sum(events#48703)#48817L, sum(weighted_amount#48705)#48818, avg(amount#48701)#48819]
Results [7]: [segment#48697, processing_day#48699, count(1)#48711L AS row_count#48706L, approx_count_distinct(customer_id#48693L, 0.05, 0, 0)#48816L AS unique_customers#48707L, sum(events#48703)#48817L AS event_sum#48708L, sum(weighted_amount#48705)#48818 AS weighted_amount_sum#48709, avg(amount#48701)#48819 AS avg_amount#48710]
(17) Exchange
Input [7]: [segment#48697, processing_day#48699, row_count#48706L, unique_customers#48707L, event_sum#48708L, weighted_amount_sum#48709, avg_amount#48710]
Arguments: rangepartitioning(segment#48697 ASC NULLS FIRST, processing_day#48699 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=4603]
(18) Sort
Input [7]: [segment#48697, processing_day#48699, row_count#48706L, unique_customers#48707L, event_sum#48708L, weighted_amount_sum#48709, avg_amount#48710]
Arguments: [segment#48697 ASC NULLS FIRST, processing_day#48699 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#48697, processing_day#48699, row_count#48706L, unique_customers#48707L, event_sum#48708L, weighted_amount_sum#48709, avg_amount#48710]
Arguments: isFinalPlan=true