== 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#77013L]
Arguments: Range (15000000, 16000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#77013L % 250000) AS customer_id#77015L, concat(segment-, cast(cast((id#77013L % 12) as int) as string)) AS segment#77019, cast((id#77013L % 14) as int) AS processing_day#77021, ((cast(((id#77013L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#77023, cast((((id#77013L * 29) % 7) + 1) as int) AS events#77025]
Input [1]: [id#77013L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#77015L, segment#77019, processing_day#77021, amount#77023, events#77025, (amount#77023 * cast(events#77025 as double)) AS weighted_amount#77027]
Input [5]: [customer_id#77015L, segment#77019, processing_day#77021, amount#77023, events#77025]
(4) HashAggregate
Input [6]: [customer_id#77015L, segment#77019, processing_day#77021, amount#77023, events#77025, weighted_amount#77027]
Keys [2]: [segment#77019, processing_day#77021]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#77015L, 0.05, 0, 0), partial_sum(events#77025), partial_sum(weighted_amount#77027), partial_avg(amount#77023)]
Aggregate Attributes [57]: [count#77246L, MS[0]#77034L, MS[1]#77035L, MS[2]#77036L, MS[3]#77037L, MS[4]#77038L, MS[5]#77039L, MS[6]#77040L, MS[7]#77041L, MS[8]#77042L, MS[9]#77043L, MS[10]#77044L, MS[11]#77045L, MS[12]#77046L, MS[13]#77047L, MS[14]#77048L, MS[15]#77049L, MS[16]#77050L, MS[17]#77051L, MS[18]#77052L, MS[19]#77053L, MS[20]#77054L, MS[21]#77055L, MS[22]#77056L, MS[23]#77057L, MS[24]#77058L, MS[25]#77059L, MS[26]#77060L, MS[27]#77061L, MS[28]#77062L, MS[29]#77063L, MS[30]#77064L, MS[31]#77065L, MS[32]#77066L, MS[33]#77067L, MS[34]#77068L, MS[35]#77069L, MS[36]#77070L, MS[37]#77071L, MS[38]#77072L, MS[39]#77073L, MS[40]#77074L, MS[41]#77075L, MS[42]#77076L, MS[43]#77077L, MS[44]#77078L, MS[45]#77079L, MS[46]#77080L, MS[47]#77081L, MS[48]#77082L, MS[49]#77083L, MS[50]#77084L, MS[51]#77085L, sum#77247L, sum#77248, sum#77249, count#77250L]
Results [59]: [segment#77019, processing_day#77021, count#77251L, MS[0]#77086L, MS[1]#77087L, MS[2]#77088L, MS[3]#77089L, MS[4]#77090L, MS[5]#77091L, MS[6]#77092L, MS[7]#77093L, MS[8]#77094L, MS[9]#77095L, MS[10]#77096L, MS[11]#77097L, MS[12]#77098L, MS[13]#77099L, MS[14]#77100L, MS[15]#77101L, MS[16]#77102L, MS[17]#77103L, MS[18]#77104L, MS[19]#77105L, MS[20]#77106L, MS[21]#77107L, MS[22]#77108L, MS[23]#77109L, MS[24]#77110L, MS[25]#77111L, MS[26]#77112L, MS[27]#77113L, MS[28]#77114L, MS[29]#77115L, MS[30]#77116L, MS[31]#77117L, MS[32]#77118L, MS[33]#77119L, MS[34]#77120L, MS[35]#77121L, MS[36]#77122L, MS[37]#77123L, MS[38]#77124L, MS[39]#77125L, MS[40]#77126L, MS[41]#77127L, MS[42]#77128L, MS[43]#77129L, MS[44]#77130L, MS[45]#77131L, MS[46]#77132L, MS[47]#77133L, MS[48]#77134L, MS[49]#77135L, MS[50]#77136L, MS[51]#77137L, sum#77252L, sum#77253, sum#77254, count#77255L]
(5) Exchange
Input [59]: [segment#77019, processing_day#77021, count#77251L, MS[0]#77086L, MS[1]#77087L, MS[2]#77088L, MS[3]#77089L, MS[4]#77090L, MS[5]#77091L, MS[6]#77092L, MS[7]#77093L, MS[8]#77094L, MS[9]#77095L, MS[10]#77096L, MS[11]#77097L, MS[12]#77098L, MS[13]#77099L, MS[14]#77100L, MS[15]#77101L, MS[16]#77102L, MS[17]#77103L, MS[18]#77104L, MS[19]#77105L, MS[20]#77106L, MS[21]#77107L, MS[22]#77108L, MS[23]#77109L, MS[24]#77110L, MS[25]#77111L, MS[26]#77112L, MS[27]#77113L, MS[28]#77114L, MS[29]#77115L, MS[30]#77116L, MS[31]#77117L, MS[32]#77118L, MS[33]#77119L, MS[34]#77120L, MS[35]#77121L, MS[36]#77122L, MS[37]#77123L, MS[38]#77124L, MS[39]#77125L, MS[40]#77126L, MS[41]#77127L, MS[42]#77128L, MS[43]#77129L, MS[44]#77130L, MS[45]#77131L, MS[46]#77132L, MS[47]#77133L, MS[48]#77134L, MS[49]#77135L, MS[50]#77136L, MS[51]#77137L, sum#77252L, sum#77253, sum#77254, count#77255L]
Arguments: hashpartitioning(segment#77019, processing_day#77021, 200), ENSURE_REQUIREMENTS, [plan_id=7282]
(6) ShuffleQueryStage
Output [59]: [segment#77019, processing_day#77021, count#77251L, MS[0]#77086L, MS[1]#77087L, MS[2]#77088L, MS[3]#77089L, MS[4]#77090L, MS[5]#77091L, MS[6]#77092L, MS[7]#77093L, MS[8]#77094L, MS[9]#77095L, MS[10]#77096L, MS[11]#77097L, MS[12]#77098L, MS[13]#77099L, MS[14]#77100L, MS[15]#77101L, MS[16]#77102L, MS[17]#77103L, MS[18]#77104L, MS[19]#77105L, MS[20]#77106L, MS[21]#77107L, MS[22]#77108L, MS[23]#77109L, MS[24]#77110L, MS[25]#77111L, MS[26]#77112L, MS[27]#77113L, MS[28]#77114L, MS[29]#77115L, MS[30]#77116L, MS[31]#77117L, MS[32]#77118L, MS[33]#77119L, MS[34]#77120L, MS[35]#77121L, MS[36]#77122L, MS[37]#77123L, MS[38]#77124L, MS[39]#77125L, MS[40]#77126L, MS[41]#77127L, MS[42]#77128L, MS[43]#77129L, MS[44]#77130L, MS[45]#77131L, MS[46]#77132L, MS[47]#77133L, MS[48]#77134L, MS[49]#77135L, MS[50]#77136L, MS[51]#77137L, sum#77252L, sum#77253, sum#77254, count#77255L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#77019, processing_day#77021, count#77251L, MS[0]#77086L, MS[1]#77087L, MS[2]#77088L, MS[3]#77089L, MS[4]#77090L, MS[5]#77091L, MS[6]#77092L, MS[7]#77093L, MS[8]#77094L, MS[9]#77095L, MS[10]#77096L, MS[11]#77097L, MS[12]#77098L, MS[13]#77099L, MS[14]#77100L, MS[15]#77101L, MS[16]#77102L, MS[17]#77103L, MS[18]#77104L, MS[19]#77105L, MS[20]#77106L, MS[21]#77107L, MS[22]#77108L, MS[23]#77109L, MS[24]#77110L, MS[25]#77111L, MS[26]#77112L, MS[27]#77113L, MS[28]#77114L, MS[29]#77115L, MS[30]#77116L, MS[31]#77117L, MS[32]#77118L, MS[33]#77119L, MS[34]#77120L, MS[35]#77121L, MS[36]#77122L, MS[37]#77123L, MS[38]#77124L, MS[39]#77125L, MS[40]#77126L, MS[41]#77127L, MS[42]#77128L, MS[43]#77129L, MS[44]#77130L, MS[45]#77131L, MS[46]#77132L, MS[47]#77133L, MS[48]#77134L, MS[49]#77135L, MS[50]#77136L, MS[51]#77137L, sum#77252L, sum#77253, sum#77254, count#77255L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#77019, processing_day#77021, count#77251L, MS[0]#77086L, MS[1]#77087L, MS[2]#77088L, MS[3]#77089L, MS[4]#77090L, MS[5]#77091L, MS[6]#77092L, MS[7]#77093L, MS[8]#77094L, MS[9]#77095L, MS[10]#77096L, MS[11]#77097L, MS[12]#77098L, MS[13]#77099L, MS[14]#77100L, MS[15]#77101L, MS[16]#77102L, MS[17]#77103L, MS[18]#77104L, MS[19]#77105L, MS[20]#77106L, MS[21]#77107L, MS[22]#77108L, MS[23]#77109L, MS[24]#77110L, MS[25]#77111L, MS[26]#77112L, MS[27]#77113L, MS[28]#77114L, MS[29]#77115L, MS[30]#77116L, MS[31]#77117L, MS[32]#77118L, MS[33]#77119L, MS[34]#77120L, MS[35]#77121L, MS[36]#77122L, MS[37]#77123L, MS[38]#77124L, MS[39]#77125L, MS[40]#77126L, MS[41]#77127L, MS[42]#77128L, MS[43]#77129L, MS[44]#77130L, MS[45]#77131L, MS[46]#77132L, MS[47]#77133L, MS[48]#77134L, MS[49]#77135L, MS[50]#77136L, MS[51]#77137L, sum#77252L, sum#77253, sum#77254, count#77255L]
Keys [2]: [segment#77019, processing_day#77021]
Functions [5]: [count(1), approx_count_distinct(customer_id#77015L, 0.05, 0, 0), sum(events#77025), sum(weighted_amount#77027), avg(amount#77023)]
Aggregate Attributes [5]: [count(1)#77033L, approx_count_distinct(customer_id#77015L, 0.05, 0, 0)#77138L, sum(events#77025)#77139L, sum(weighted_amount#77027)#77140, avg(amount#77023)#77141]
Results [7]: [segment#77019, processing_day#77021, count(1)#77033L AS row_count#77028L, approx_count_distinct(customer_id#77015L, 0.05, 0, 0)#77138L AS unique_customers#77029L, sum(events#77025)#77139L AS event_sum#77030L, sum(weighted_amount#77027)#77140 AS weighted_amount_sum#77031, avg(amount#77023)#77141 AS avg_amount#77032]
(9) Exchange
Input [7]: [segment#77019, processing_day#77021, row_count#77028L, unique_customers#77029L, event_sum#77030L, weighted_amount_sum#77031, avg_amount#77032]
Arguments: rangepartitioning(segment#77019 ASC NULLS FIRST, processing_day#77021 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=7304]
(10) ShuffleQueryStage
Output [7]: [segment#77019, processing_day#77021, row_count#77028L, unique_customers#77029L, event_sum#77030L, weighted_amount_sum#77031, avg_amount#77032]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#77019, processing_day#77021, row_count#77028L, unique_customers#77029L, event_sum#77030L, weighted_amount_sum#77031, avg_amount#77032]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#77019, processing_day#77021, row_count#77028L, unique_customers#77029L, event_sum#77030L, weighted_amount_sum#77031, avg_amount#77032]
Arguments: [segment#77019 ASC NULLS FIRST, processing_day#77021 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#77019, processing_day#77021, row_count#77028L, unique_customers#77029L, event_sum#77030L, weighted_amount_sum#77031, avg_amount#77032]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#77015L, segment#77019, processing_day#77021, amount#77023, events#77025, weighted_amount#77027]
Keys [2]: [segment#77019, processing_day#77021]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#77015L, 0.05, 0, 0), partial_sum(events#77025), partial_sum(weighted_amount#77027), partial_avg(amount#77023)]
Aggregate Attributes [57]: [count#77246L, MS[0]#77034L, MS[1]#77035L, MS[2]#77036L, MS[3]#77037L, MS[4]#77038L, MS[5]#77039L, MS[6]#77040L, MS[7]#77041L, MS[8]#77042L, MS[9]#77043L, MS[10]#77044L, MS[11]#77045L, MS[12]#77046L, MS[13]#77047L, MS[14]#77048L, MS[15]#77049L, MS[16]#77050L, MS[17]#77051L, MS[18]#77052L, MS[19]#77053L, MS[20]#77054L, MS[21]#77055L, MS[22]#77056L, MS[23]#77057L, MS[24]#77058L, MS[25]#77059L, MS[26]#77060L, MS[27]#77061L, MS[28]#77062L, MS[29]#77063L, MS[30]#77064L, MS[31]#77065L, MS[32]#77066L, MS[33]#77067L, MS[34]#77068L, MS[35]#77069L, MS[36]#77070L, MS[37]#77071L, MS[38]#77072L, MS[39]#77073L, MS[40]#77074L, MS[41]#77075L, MS[42]#77076L, MS[43]#77077L, MS[44]#77078L, MS[45]#77079L, MS[46]#77080L, MS[47]#77081L, MS[48]#77082L, MS[49]#77083L, MS[50]#77084L, MS[51]#77085L, sum#77247L, sum#77248, sum#77249, count#77250L]
Results [59]: [segment#77019, processing_day#77021, count#77251L, MS[0]#77086L, MS[1]#77087L, MS[2]#77088L, MS[3]#77089L, MS[4]#77090L, MS[5]#77091L, MS[6]#77092L, MS[7]#77093L, MS[8]#77094L, MS[9]#77095L, MS[10]#77096L, MS[11]#77097L, MS[12]#77098L, MS[13]#77099L, MS[14]#77100L, MS[15]#77101L, MS[16]#77102L, MS[17]#77103L, MS[18]#77104L, MS[19]#77105L, MS[20]#77106L, MS[21]#77107L, MS[22]#77108L, MS[23]#77109L, MS[24]#77110L, MS[25]#77111L, MS[26]#77112L, MS[27]#77113L, MS[28]#77114L, MS[29]#77115L, MS[30]#77116L, MS[31]#77117L, MS[32]#77118L, MS[33]#77119L, MS[34]#77120L, MS[35]#77121L, MS[36]#77122L, MS[37]#77123L, MS[38]#77124L, MS[39]#77125L, MS[40]#77126L, MS[41]#77127L, MS[42]#77128L, MS[43]#77129L, MS[44]#77130L, MS[45]#77131L, MS[46]#77132L, MS[47]#77133L, MS[48]#77134L, MS[49]#77135L, MS[50]#77136L, MS[51]#77137L, sum#77252L, sum#77253, sum#77254, count#77255L]
(15) Exchange
Input [59]: [segment#77019, processing_day#77021, count#77251L, MS[0]#77086L, MS[1]#77087L, MS[2]#77088L, MS[3]#77089L, MS[4]#77090L, MS[5]#77091L, MS[6]#77092L, MS[7]#77093L, MS[8]#77094L, MS[9]#77095L, MS[10]#77096L, MS[11]#77097L, MS[12]#77098L, MS[13]#77099L, MS[14]#77100L, MS[15]#77101L, MS[16]#77102L, MS[17]#77103L, MS[18]#77104L, MS[19]#77105L, MS[20]#77106L, MS[21]#77107L, MS[22]#77108L, MS[23]#77109L, MS[24]#77110L, MS[25]#77111L, MS[26]#77112L, MS[27]#77113L, MS[28]#77114L, MS[29]#77115L, MS[30]#77116L, MS[31]#77117L, MS[32]#77118L, MS[33]#77119L, MS[34]#77120L, MS[35]#77121L, MS[36]#77122L, MS[37]#77123L, MS[38]#77124L, MS[39]#77125L, MS[40]#77126L, MS[41]#77127L, MS[42]#77128L, MS[43]#77129L, MS[44]#77130L, MS[45]#77131L, MS[46]#77132L, MS[47]#77133L, MS[48]#77134L, MS[49]#77135L, MS[50]#77136L, MS[51]#77137L, sum#77252L, sum#77253, sum#77254, count#77255L]
Arguments: hashpartitioning(segment#77019, processing_day#77021, 200), ENSURE_REQUIREMENTS, [plan_id=7262]
(16) HashAggregate
Input [59]: [segment#77019, processing_day#77021, count#77251L, MS[0]#77086L, MS[1]#77087L, MS[2]#77088L, MS[3]#77089L, MS[4]#77090L, MS[5]#77091L, MS[6]#77092L, MS[7]#77093L, MS[8]#77094L, MS[9]#77095L, MS[10]#77096L, MS[11]#77097L, MS[12]#77098L, MS[13]#77099L, MS[14]#77100L, MS[15]#77101L, MS[16]#77102L, MS[17]#77103L, MS[18]#77104L, MS[19]#77105L, MS[20]#77106L, MS[21]#77107L, MS[22]#77108L, MS[23]#77109L, MS[24]#77110L, MS[25]#77111L, MS[26]#77112L, MS[27]#77113L, MS[28]#77114L, MS[29]#77115L, MS[30]#77116L, MS[31]#77117L, MS[32]#77118L, MS[33]#77119L, MS[34]#77120L, MS[35]#77121L, MS[36]#77122L, MS[37]#77123L, MS[38]#77124L, MS[39]#77125L, MS[40]#77126L, MS[41]#77127L, MS[42]#77128L, MS[43]#77129L, MS[44]#77130L, MS[45]#77131L, MS[46]#77132L, MS[47]#77133L, MS[48]#77134L, MS[49]#77135L, MS[50]#77136L, MS[51]#77137L, sum#77252L, sum#77253, sum#77254, count#77255L]
Keys [2]: [segment#77019, processing_day#77021]
Functions [5]: [count(1), approx_count_distinct(customer_id#77015L, 0.05, 0, 0), sum(events#77025), sum(weighted_amount#77027), avg(amount#77023)]
Aggregate Attributes [5]: [count(1)#77033L, approx_count_distinct(customer_id#77015L, 0.05, 0, 0)#77138L, sum(events#77025)#77139L, sum(weighted_amount#77027)#77140, avg(amount#77023)#77141]
Results [7]: [segment#77019, processing_day#77021, count(1)#77033L AS row_count#77028L, approx_count_distinct(customer_id#77015L, 0.05, 0, 0)#77138L AS unique_customers#77029L, sum(events#77025)#77139L AS event_sum#77030L, sum(weighted_amount#77027)#77140 AS weighted_amount_sum#77031, avg(amount#77023)#77141 AS avg_amount#77032]
(17) Exchange
Input [7]: [segment#77019, processing_day#77021, row_count#77028L, unique_customers#77029L, event_sum#77030L, weighted_amount_sum#77031, avg_amount#77032]
Arguments: rangepartitioning(segment#77019 ASC NULLS FIRST, processing_day#77021 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=7265]
(18) Sort
Input [7]: [segment#77019, processing_day#77021, row_count#77028L, unique_customers#77029L, event_sum#77030L, weighted_amount_sum#77031, avg_amount#77032]
Arguments: [segment#77019 ASC NULLS FIRST, processing_day#77021 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#77019, processing_day#77021, row_count#77028L, unique_customers#77029L, event_sum#77030L, weighted_amount_sum#77031, avg_amount#77032]
Arguments: isFinalPlan=true