== 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#77897L]
Arguments: Range (16000000, 17000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#77897L % 250000) AS customer_id#77899L, concat(segment-, cast(cast((id#77897L % 12) as int) as string)) AS segment#77903, cast((id#77897L % 14) as int) AS processing_day#77905, ((cast(((id#77897L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#77907, cast((((id#77897L * 29) % 7) + 1) as int) AS events#77909]
Input [1]: [id#77897L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#77899L, segment#77903, processing_day#77905, amount#77907, events#77909, (amount#77907 * cast(events#77909 as double)) AS weighted_amount#77911]
Input [5]: [customer_id#77899L, segment#77903, processing_day#77905, amount#77907, events#77909]
(4) HashAggregate
Input [6]: [customer_id#77899L, segment#77903, processing_day#77905, amount#77907, events#77909, weighted_amount#77911]
Keys [2]: [segment#77903, processing_day#77905]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#77899L, 0.05, 0, 0), partial_sum(events#77909), partial_sum(weighted_amount#77911), partial_avg(amount#77907)]
Aggregate Attributes [57]: [count#78130L, MS[0]#77918L, MS[1]#77919L, MS[2]#77920L, MS[3]#77921L, MS[4]#77922L, MS[5]#77923L, MS[6]#77924L, MS[7]#77925L, MS[8]#77926L, MS[9]#77927L, MS[10]#77928L, MS[11]#77929L, MS[12]#77930L, MS[13]#77931L, MS[14]#77932L, MS[15]#77933L, MS[16]#77934L, MS[17]#77935L, MS[18]#77936L, MS[19]#77937L, MS[20]#77938L, MS[21]#77939L, MS[22]#77940L, MS[23]#77941L, MS[24]#77942L, MS[25]#77943L, MS[26]#77944L, MS[27]#77945L, MS[28]#77946L, MS[29]#77947L, MS[30]#77948L, MS[31]#77949L, MS[32]#77950L, MS[33]#77951L, MS[34]#77952L, MS[35]#77953L, MS[36]#77954L, MS[37]#77955L, MS[38]#77956L, MS[39]#77957L, MS[40]#77958L, MS[41]#77959L, MS[42]#77960L, MS[43]#77961L, MS[44]#77962L, MS[45]#77963L, MS[46]#77964L, MS[47]#77965L, MS[48]#77966L, MS[49]#77967L, MS[50]#77968L, MS[51]#77969L, sum#78131L, sum#78132, sum#78133, count#78134L]
Results [59]: [segment#77903, processing_day#77905, count#78135L, MS[0]#77970L, MS[1]#77971L, MS[2]#77972L, MS[3]#77973L, MS[4]#77974L, MS[5]#77975L, MS[6]#77976L, MS[7]#77977L, MS[8]#77978L, MS[9]#77979L, MS[10]#77980L, MS[11]#77981L, MS[12]#77982L, MS[13]#77983L, MS[14]#77984L, MS[15]#77985L, MS[16]#77986L, MS[17]#77987L, MS[18]#77988L, MS[19]#77989L, MS[20]#77990L, MS[21]#77991L, MS[22]#77992L, MS[23]#77993L, MS[24]#77994L, MS[25]#77995L, MS[26]#77996L, MS[27]#77997L, MS[28]#77998L, MS[29]#77999L, MS[30]#78000L, MS[31]#78001L, MS[32]#78002L, MS[33]#78003L, MS[34]#78004L, MS[35]#78005L, MS[36]#78006L, MS[37]#78007L, MS[38]#78008L, MS[39]#78009L, MS[40]#78010L, MS[41]#78011L, MS[42]#78012L, MS[43]#78013L, MS[44]#78014L, MS[45]#78015L, MS[46]#78016L, MS[47]#78017L, MS[48]#78018L, MS[49]#78019L, MS[50]#78020L, MS[51]#78021L, sum#78136L, sum#78137, sum#78138, count#78139L]
(5) Exchange
Input [59]: [segment#77903, processing_day#77905, count#78135L, MS[0]#77970L, MS[1]#77971L, MS[2]#77972L, MS[3]#77973L, MS[4]#77974L, MS[5]#77975L, MS[6]#77976L, MS[7]#77977L, MS[8]#77978L, MS[9]#77979L, MS[10]#77980L, MS[11]#77981L, MS[12]#77982L, MS[13]#77983L, MS[14]#77984L, MS[15]#77985L, MS[16]#77986L, MS[17]#77987L, MS[18]#77988L, MS[19]#77989L, MS[20]#77990L, MS[21]#77991L, MS[22]#77992L, MS[23]#77993L, MS[24]#77994L, MS[25]#77995L, MS[26]#77996L, MS[27]#77997L, MS[28]#77998L, MS[29]#77999L, MS[30]#78000L, MS[31]#78001L, MS[32]#78002L, MS[33]#78003L, MS[34]#78004L, MS[35]#78005L, MS[36]#78006L, MS[37]#78007L, MS[38]#78008L, MS[39]#78009L, MS[40]#78010L, MS[41]#78011L, MS[42]#78012L, MS[43]#78013L, MS[44]#78014L, MS[45]#78015L, MS[46]#78016L, MS[47]#78017L, MS[48]#78018L, MS[49]#78019L, MS[50]#78020L, MS[51]#78021L, sum#78136L, sum#78137, sum#78138, count#78139L]
Arguments: hashpartitioning(segment#77903, processing_day#77905, 200), ENSURE_REQUIREMENTS, [plan_id=7365]
(6) ShuffleQueryStage
Output [59]: [segment#77903, processing_day#77905, count#78135L, MS[0]#77970L, MS[1]#77971L, MS[2]#77972L, MS[3]#77973L, MS[4]#77974L, MS[5]#77975L, MS[6]#77976L, MS[7]#77977L, MS[8]#77978L, MS[9]#77979L, MS[10]#77980L, MS[11]#77981L, MS[12]#77982L, MS[13]#77983L, MS[14]#77984L, MS[15]#77985L, MS[16]#77986L, MS[17]#77987L, MS[18]#77988L, MS[19]#77989L, MS[20]#77990L, MS[21]#77991L, MS[22]#77992L, MS[23]#77993L, MS[24]#77994L, MS[25]#77995L, MS[26]#77996L, MS[27]#77997L, MS[28]#77998L, MS[29]#77999L, MS[30]#78000L, MS[31]#78001L, MS[32]#78002L, MS[33]#78003L, MS[34]#78004L, MS[35]#78005L, MS[36]#78006L, MS[37]#78007L, MS[38]#78008L, MS[39]#78009L, MS[40]#78010L, MS[41]#78011L, MS[42]#78012L, MS[43]#78013L, MS[44]#78014L, MS[45]#78015L, MS[46]#78016L, MS[47]#78017L, MS[48]#78018L, MS[49]#78019L, MS[50]#78020L, MS[51]#78021L, sum#78136L, sum#78137, sum#78138, count#78139L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#77903, processing_day#77905, count#78135L, MS[0]#77970L, MS[1]#77971L, MS[2]#77972L, MS[3]#77973L, MS[4]#77974L, MS[5]#77975L, MS[6]#77976L, MS[7]#77977L, MS[8]#77978L, MS[9]#77979L, MS[10]#77980L, MS[11]#77981L, MS[12]#77982L, MS[13]#77983L, MS[14]#77984L, MS[15]#77985L, MS[16]#77986L, MS[17]#77987L, MS[18]#77988L, MS[19]#77989L, MS[20]#77990L, MS[21]#77991L, MS[22]#77992L, MS[23]#77993L, MS[24]#77994L, MS[25]#77995L, MS[26]#77996L, MS[27]#77997L, MS[28]#77998L, MS[29]#77999L, MS[30]#78000L, MS[31]#78001L, MS[32]#78002L, MS[33]#78003L, MS[34]#78004L, MS[35]#78005L, MS[36]#78006L, MS[37]#78007L, MS[38]#78008L, MS[39]#78009L, MS[40]#78010L, MS[41]#78011L, MS[42]#78012L, MS[43]#78013L, MS[44]#78014L, MS[45]#78015L, MS[46]#78016L, MS[47]#78017L, MS[48]#78018L, MS[49]#78019L, MS[50]#78020L, MS[51]#78021L, sum#78136L, sum#78137, sum#78138, count#78139L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#77903, processing_day#77905, count#78135L, MS[0]#77970L, MS[1]#77971L, MS[2]#77972L, MS[3]#77973L, MS[4]#77974L, MS[5]#77975L, MS[6]#77976L, MS[7]#77977L, MS[8]#77978L, MS[9]#77979L, MS[10]#77980L, MS[11]#77981L, MS[12]#77982L, MS[13]#77983L, MS[14]#77984L, MS[15]#77985L, MS[16]#77986L, MS[17]#77987L, MS[18]#77988L, MS[19]#77989L, MS[20]#77990L, MS[21]#77991L, MS[22]#77992L, MS[23]#77993L, MS[24]#77994L, MS[25]#77995L, MS[26]#77996L, MS[27]#77997L, MS[28]#77998L, MS[29]#77999L, MS[30]#78000L, MS[31]#78001L, MS[32]#78002L, MS[33]#78003L, MS[34]#78004L, MS[35]#78005L, MS[36]#78006L, MS[37]#78007L, MS[38]#78008L, MS[39]#78009L, MS[40]#78010L, MS[41]#78011L, MS[42]#78012L, MS[43]#78013L, MS[44]#78014L, MS[45]#78015L, MS[46]#78016L, MS[47]#78017L, MS[48]#78018L, MS[49]#78019L, MS[50]#78020L, MS[51]#78021L, sum#78136L, sum#78137, sum#78138, count#78139L]
Keys [2]: [segment#77903, processing_day#77905]
Functions [5]: [count(1), approx_count_distinct(customer_id#77899L, 0.05, 0, 0), sum(events#77909), sum(weighted_amount#77911), avg(amount#77907)]
Aggregate Attributes [5]: [count(1)#77917L, approx_count_distinct(customer_id#77899L, 0.05, 0, 0)#78022L, sum(events#77909)#78023L, sum(weighted_amount#77911)#78024, avg(amount#77907)#78025]
Results [7]: [segment#77903, processing_day#77905, count(1)#77917L AS row_count#77912L, approx_count_distinct(customer_id#77899L, 0.05, 0, 0)#78022L AS unique_customers#77913L, sum(events#77909)#78023L AS event_sum#77914L, sum(weighted_amount#77911)#78024 AS weighted_amount_sum#77915, avg(amount#77907)#78025 AS avg_amount#77916]
(9) Exchange
Input [7]: [segment#77903, processing_day#77905, row_count#77912L, unique_customers#77913L, event_sum#77914L, weighted_amount_sum#77915, avg_amount#77916]
Arguments: rangepartitioning(segment#77903 ASC NULLS FIRST, processing_day#77905 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=7387]
(10) ShuffleQueryStage
Output [7]: [segment#77903, processing_day#77905, row_count#77912L, unique_customers#77913L, event_sum#77914L, weighted_amount_sum#77915, avg_amount#77916]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#77903, processing_day#77905, row_count#77912L, unique_customers#77913L, event_sum#77914L, weighted_amount_sum#77915, avg_amount#77916]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#77903, processing_day#77905, row_count#77912L, unique_customers#77913L, event_sum#77914L, weighted_amount_sum#77915, avg_amount#77916]
Arguments: [segment#77903 ASC NULLS FIRST, processing_day#77905 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#77903, processing_day#77905, row_count#77912L, unique_customers#77913L, event_sum#77914L, weighted_amount_sum#77915, avg_amount#77916]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#77899L, segment#77903, processing_day#77905, amount#77907, events#77909, weighted_amount#77911]
Keys [2]: [segment#77903, processing_day#77905]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#77899L, 0.05, 0, 0), partial_sum(events#77909), partial_sum(weighted_amount#77911), partial_avg(amount#77907)]
Aggregate Attributes [57]: [count#78130L, MS[0]#77918L, MS[1]#77919L, MS[2]#77920L, MS[3]#77921L, MS[4]#77922L, MS[5]#77923L, MS[6]#77924L, MS[7]#77925L, MS[8]#77926L, MS[9]#77927L, MS[10]#77928L, MS[11]#77929L, MS[12]#77930L, MS[13]#77931L, MS[14]#77932L, MS[15]#77933L, MS[16]#77934L, MS[17]#77935L, MS[18]#77936L, MS[19]#77937L, MS[20]#77938L, MS[21]#77939L, MS[22]#77940L, MS[23]#77941L, MS[24]#77942L, MS[25]#77943L, MS[26]#77944L, MS[27]#77945L, MS[28]#77946L, MS[29]#77947L, MS[30]#77948L, MS[31]#77949L, MS[32]#77950L, MS[33]#77951L, MS[34]#77952L, MS[35]#77953L, MS[36]#77954L, MS[37]#77955L, MS[38]#77956L, MS[39]#77957L, MS[40]#77958L, MS[41]#77959L, MS[42]#77960L, MS[43]#77961L, MS[44]#77962L, MS[45]#77963L, MS[46]#77964L, MS[47]#77965L, MS[48]#77966L, MS[49]#77967L, MS[50]#77968L, MS[51]#77969L, sum#78131L, sum#78132, sum#78133, count#78134L]
Results [59]: [segment#77903, processing_day#77905, count#78135L, MS[0]#77970L, MS[1]#77971L, MS[2]#77972L, MS[3]#77973L, MS[4]#77974L, MS[5]#77975L, MS[6]#77976L, MS[7]#77977L, MS[8]#77978L, MS[9]#77979L, MS[10]#77980L, MS[11]#77981L, MS[12]#77982L, MS[13]#77983L, MS[14]#77984L, MS[15]#77985L, MS[16]#77986L, MS[17]#77987L, MS[18]#77988L, MS[19]#77989L, MS[20]#77990L, MS[21]#77991L, MS[22]#77992L, MS[23]#77993L, MS[24]#77994L, MS[25]#77995L, MS[26]#77996L, MS[27]#77997L, MS[28]#77998L, MS[29]#77999L, MS[30]#78000L, MS[31]#78001L, MS[32]#78002L, MS[33]#78003L, MS[34]#78004L, MS[35]#78005L, MS[36]#78006L, MS[37]#78007L, MS[38]#78008L, MS[39]#78009L, MS[40]#78010L, MS[41]#78011L, MS[42]#78012L, MS[43]#78013L, MS[44]#78014L, MS[45]#78015L, MS[46]#78016L, MS[47]#78017L, MS[48]#78018L, MS[49]#78019L, MS[50]#78020L, MS[51]#78021L, sum#78136L, sum#78137, sum#78138, count#78139L]
(15) Exchange
Input [59]: [segment#77903, processing_day#77905, count#78135L, MS[0]#77970L, MS[1]#77971L, MS[2]#77972L, MS[3]#77973L, MS[4]#77974L, MS[5]#77975L, MS[6]#77976L, MS[7]#77977L, MS[8]#77978L, MS[9]#77979L, MS[10]#77980L, MS[11]#77981L, MS[12]#77982L, MS[13]#77983L, MS[14]#77984L, MS[15]#77985L, MS[16]#77986L, MS[17]#77987L, MS[18]#77988L, MS[19]#77989L, MS[20]#77990L, MS[21]#77991L, MS[22]#77992L, MS[23]#77993L, MS[24]#77994L, MS[25]#77995L, MS[26]#77996L, MS[27]#77997L, MS[28]#77998L, MS[29]#77999L, MS[30]#78000L, MS[31]#78001L, MS[32]#78002L, MS[33]#78003L, MS[34]#78004L, MS[35]#78005L, MS[36]#78006L, MS[37]#78007L, MS[38]#78008L, MS[39]#78009L, MS[40]#78010L, MS[41]#78011L, MS[42]#78012L, MS[43]#78013L, MS[44]#78014L, MS[45]#78015L, MS[46]#78016L, MS[47]#78017L, MS[48]#78018L, MS[49]#78019L, MS[50]#78020L, MS[51]#78021L, sum#78136L, sum#78137, sum#78138, count#78139L]
Arguments: hashpartitioning(segment#77903, processing_day#77905, 200), ENSURE_REQUIREMENTS, [plan_id=7345]
(16) HashAggregate
Input [59]: [segment#77903, processing_day#77905, count#78135L, MS[0]#77970L, MS[1]#77971L, MS[2]#77972L, MS[3]#77973L, MS[4]#77974L, MS[5]#77975L, MS[6]#77976L, MS[7]#77977L, MS[8]#77978L, MS[9]#77979L, MS[10]#77980L, MS[11]#77981L, MS[12]#77982L, MS[13]#77983L, MS[14]#77984L, MS[15]#77985L, MS[16]#77986L, MS[17]#77987L, MS[18]#77988L, MS[19]#77989L, MS[20]#77990L, MS[21]#77991L, MS[22]#77992L, MS[23]#77993L, MS[24]#77994L, MS[25]#77995L, MS[26]#77996L, MS[27]#77997L, MS[28]#77998L, MS[29]#77999L, MS[30]#78000L, MS[31]#78001L, MS[32]#78002L, MS[33]#78003L, MS[34]#78004L, MS[35]#78005L, MS[36]#78006L, MS[37]#78007L, MS[38]#78008L, MS[39]#78009L, MS[40]#78010L, MS[41]#78011L, MS[42]#78012L, MS[43]#78013L, MS[44]#78014L, MS[45]#78015L, MS[46]#78016L, MS[47]#78017L, MS[48]#78018L, MS[49]#78019L, MS[50]#78020L, MS[51]#78021L, sum#78136L, sum#78137, sum#78138, count#78139L]
Keys [2]: [segment#77903, processing_day#77905]
Functions [5]: [count(1), approx_count_distinct(customer_id#77899L, 0.05, 0, 0), sum(events#77909), sum(weighted_amount#77911), avg(amount#77907)]
Aggregate Attributes [5]: [count(1)#77917L, approx_count_distinct(customer_id#77899L, 0.05, 0, 0)#78022L, sum(events#77909)#78023L, sum(weighted_amount#77911)#78024, avg(amount#77907)#78025]
Results [7]: [segment#77903, processing_day#77905, count(1)#77917L AS row_count#77912L, approx_count_distinct(customer_id#77899L, 0.05, 0, 0)#78022L AS unique_customers#77913L, sum(events#77909)#78023L AS event_sum#77914L, sum(weighted_amount#77911)#78024 AS weighted_amount_sum#77915, avg(amount#77907)#78025 AS avg_amount#77916]
(17) Exchange
Input [7]: [segment#77903, processing_day#77905, row_count#77912L, unique_customers#77913L, event_sum#77914L, weighted_amount_sum#77915, avg_amount#77916]
Arguments: rangepartitioning(segment#77903 ASC NULLS FIRST, processing_day#77905 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=7348]
(18) Sort
Input [7]: [segment#77903, processing_day#77905, row_count#77912L, unique_customers#77913L, event_sum#77914L, weighted_amount_sum#77915, avg_amount#77916]
Arguments: [segment#77903 ASC NULLS FIRST, processing_day#77905 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#77903, processing_day#77905, row_count#77912L, unique_customers#77913L, event_sum#77914L, weighted_amount_sum#77915, avg_amount#77916]
Arguments: isFinalPlan=true