== 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#84085L]
Arguments: Range (23000000, 24000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#84085L % 250000) AS customer_id#84087L, concat(segment-, cast(cast((id#84085L % 12) as int) as string)) AS segment#84091, cast((id#84085L % 14) as int) AS processing_day#84093, ((cast(((id#84085L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#84095, cast((((id#84085L * 29) % 7) + 1) as int) AS events#84097]
Input [1]: [id#84085L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#84087L, segment#84091, processing_day#84093, amount#84095, events#84097, (amount#84095 * cast(events#84097 as double)) AS weighted_amount#84099]
Input [5]: [customer_id#84087L, segment#84091, processing_day#84093, amount#84095, events#84097]
(4) HashAggregate
Input [6]: [customer_id#84087L, segment#84091, processing_day#84093, amount#84095, events#84097, weighted_amount#84099]
Keys [2]: [segment#84091, processing_day#84093]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#84087L, 0.05, 0, 0), partial_sum(events#84097), partial_sum(weighted_amount#84099), partial_avg(amount#84095)]
Aggregate Attributes [57]: [count#84318L, MS[0]#84106L, MS[1]#84107L, MS[2]#84108L, MS[3]#84109L, MS[4]#84110L, MS[5]#84111L, MS[6]#84112L, MS[7]#84113L, MS[8]#84114L, MS[9]#84115L, MS[10]#84116L, MS[11]#84117L, MS[12]#84118L, MS[13]#84119L, MS[14]#84120L, MS[15]#84121L, MS[16]#84122L, MS[17]#84123L, MS[18]#84124L, MS[19]#84125L, MS[20]#84126L, MS[21]#84127L, MS[22]#84128L, MS[23]#84129L, MS[24]#84130L, MS[25]#84131L, MS[26]#84132L, MS[27]#84133L, MS[28]#84134L, MS[29]#84135L, MS[30]#84136L, MS[31]#84137L, MS[32]#84138L, MS[33]#84139L, MS[34]#84140L, MS[35]#84141L, MS[36]#84142L, MS[37]#84143L, MS[38]#84144L, MS[39]#84145L, MS[40]#84146L, MS[41]#84147L, MS[42]#84148L, MS[43]#84149L, MS[44]#84150L, MS[45]#84151L, MS[46]#84152L, MS[47]#84153L, MS[48]#84154L, MS[49]#84155L, MS[50]#84156L, MS[51]#84157L, sum#84319L, sum#84320, sum#84321, count#84322L]
Results [59]: [segment#84091, processing_day#84093, count#84323L, MS[0]#84158L, MS[1]#84159L, MS[2]#84160L, MS[3]#84161L, MS[4]#84162L, MS[5]#84163L, MS[6]#84164L, MS[7]#84165L, MS[8]#84166L, MS[9]#84167L, MS[10]#84168L, MS[11]#84169L, MS[12]#84170L, MS[13]#84171L, MS[14]#84172L, MS[15]#84173L, MS[16]#84174L, MS[17]#84175L, MS[18]#84176L, MS[19]#84177L, MS[20]#84178L, MS[21]#84179L, MS[22]#84180L, MS[23]#84181L, MS[24]#84182L, MS[25]#84183L, MS[26]#84184L, MS[27]#84185L, MS[28]#84186L, MS[29]#84187L, MS[30]#84188L, MS[31]#84189L, MS[32]#84190L, MS[33]#84191L, MS[34]#84192L, MS[35]#84193L, MS[36]#84194L, MS[37]#84195L, MS[38]#84196L, MS[39]#84197L, MS[40]#84198L, MS[41]#84199L, MS[42]#84200L, MS[43]#84201L, MS[44]#84202L, MS[45]#84203L, MS[46]#84204L, MS[47]#84205L, MS[48]#84206L, MS[49]#84207L, MS[50]#84208L, MS[51]#84209L, sum#84324L, sum#84325, sum#84326, count#84327L]
(5) Exchange
Input [59]: [segment#84091, processing_day#84093, count#84323L, MS[0]#84158L, MS[1]#84159L, MS[2]#84160L, MS[3]#84161L, MS[4]#84162L, MS[5]#84163L, MS[6]#84164L, MS[7]#84165L, MS[8]#84166L, MS[9]#84167L, MS[10]#84168L, MS[11]#84169L, MS[12]#84170L, MS[13]#84171L, MS[14]#84172L, MS[15]#84173L, MS[16]#84174L, MS[17]#84175L, MS[18]#84176L, MS[19]#84177L, MS[20]#84178L, MS[21]#84179L, MS[22]#84180L, MS[23]#84181L, MS[24]#84182L, MS[25]#84183L, MS[26]#84184L, MS[27]#84185L, MS[28]#84186L, MS[29]#84187L, MS[30]#84188L, MS[31]#84189L, MS[32]#84190L, MS[33]#84191L, MS[34]#84192L, MS[35]#84193L, MS[36]#84194L, MS[37]#84195L, MS[38]#84196L, MS[39]#84197L, MS[40]#84198L, MS[41]#84199L, MS[42]#84200L, MS[43]#84201L, MS[44]#84202L, MS[45]#84203L, MS[46]#84204L, MS[47]#84205L, MS[48]#84206L, MS[49]#84207L, MS[50]#84208L, MS[51]#84209L, sum#84324L, sum#84325, sum#84326, count#84327L]
Arguments: hashpartitioning(segment#84091, processing_day#84093, 200), ENSURE_REQUIREMENTS, [plan_id=7946]
(6) ShuffleQueryStage
Output [59]: [segment#84091, processing_day#84093, count#84323L, MS[0]#84158L, MS[1]#84159L, MS[2]#84160L, MS[3]#84161L, MS[4]#84162L, MS[5]#84163L, MS[6]#84164L, MS[7]#84165L, MS[8]#84166L, MS[9]#84167L, MS[10]#84168L, MS[11]#84169L, MS[12]#84170L, MS[13]#84171L, MS[14]#84172L, MS[15]#84173L, MS[16]#84174L, MS[17]#84175L, MS[18]#84176L, MS[19]#84177L, MS[20]#84178L, MS[21]#84179L, MS[22]#84180L, MS[23]#84181L, MS[24]#84182L, MS[25]#84183L, MS[26]#84184L, MS[27]#84185L, MS[28]#84186L, MS[29]#84187L, MS[30]#84188L, MS[31]#84189L, MS[32]#84190L, MS[33]#84191L, MS[34]#84192L, MS[35]#84193L, MS[36]#84194L, MS[37]#84195L, MS[38]#84196L, MS[39]#84197L, MS[40]#84198L, MS[41]#84199L, MS[42]#84200L, MS[43]#84201L, MS[44]#84202L, MS[45]#84203L, MS[46]#84204L, MS[47]#84205L, MS[48]#84206L, MS[49]#84207L, MS[50]#84208L, MS[51]#84209L, sum#84324L, sum#84325, sum#84326, count#84327L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#84091, processing_day#84093, count#84323L, MS[0]#84158L, MS[1]#84159L, MS[2]#84160L, MS[3]#84161L, MS[4]#84162L, MS[5]#84163L, MS[6]#84164L, MS[7]#84165L, MS[8]#84166L, MS[9]#84167L, MS[10]#84168L, MS[11]#84169L, MS[12]#84170L, MS[13]#84171L, MS[14]#84172L, MS[15]#84173L, MS[16]#84174L, MS[17]#84175L, MS[18]#84176L, MS[19]#84177L, MS[20]#84178L, MS[21]#84179L, MS[22]#84180L, MS[23]#84181L, MS[24]#84182L, MS[25]#84183L, MS[26]#84184L, MS[27]#84185L, MS[28]#84186L, MS[29]#84187L, MS[30]#84188L, MS[31]#84189L, MS[32]#84190L, MS[33]#84191L, MS[34]#84192L, MS[35]#84193L, MS[36]#84194L, MS[37]#84195L, MS[38]#84196L, MS[39]#84197L, MS[40]#84198L, MS[41]#84199L, MS[42]#84200L, MS[43]#84201L, MS[44]#84202L, MS[45]#84203L, MS[46]#84204L, MS[47]#84205L, MS[48]#84206L, MS[49]#84207L, MS[50]#84208L, MS[51]#84209L, sum#84324L, sum#84325, sum#84326, count#84327L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#84091, processing_day#84093, count#84323L, MS[0]#84158L, MS[1]#84159L, MS[2]#84160L, MS[3]#84161L, MS[4]#84162L, MS[5]#84163L, MS[6]#84164L, MS[7]#84165L, MS[8]#84166L, MS[9]#84167L, MS[10]#84168L, MS[11]#84169L, MS[12]#84170L, MS[13]#84171L, MS[14]#84172L, MS[15]#84173L, MS[16]#84174L, MS[17]#84175L, MS[18]#84176L, MS[19]#84177L, MS[20]#84178L, MS[21]#84179L, MS[22]#84180L, MS[23]#84181L, MS[24]#84182L, MS[25]#84183L, MS[26]#84184L, MS[27]#84185L, MS[28]#84186L, MS[29]#84187L, MS[30]#84188L, MS[31]#84189L, MS[32]#84190L, MS[33]#84191L, MS[34]#84192L, MS[35]#84193L, MS[36]#84194L, MS[37]#84195L, MS[38]#84196L, MS[39]#84197L, MS[40]#84198L, MS[41]#84199L, MS[42]#84200L, MS[43]#84201L, MS[44]#84202L, MS[45]#84203L, MS[46]#84204L, MS[47]#84205L, MS[48]#84206L, MS[49]#84207L, MS[50]#84208L, MS[51]#84209L, sum#84324L, sum#84325, sum#84326, count#84327L]
Keys [2]: [segment#84091, processing_day#84093]
Functions [5]: [count(1), approx_count_distinct(customer_id#84087L, 0.05, 0, 0), sum(events#84097), sum(weighted_amount#84099), avg(amount#84095)]
Aggregate Attributes [5]: [count(1)#84105L, approx_count_distinct(customer_id#84087L, 0.05, 0, 0)#84210L, sum(events#84097)#84211L, sum(weighted_amount#84099)#84212, avg(amount#84095)#84213]
Results [7]: [segment#84091, processing_day#84093, count(1)#84105L AS row_count#84100L, approx_count_distinct(customer_id#84087L, 0.05, 0, 0)#84210L AS unique_customers#84101L, sum(events#84097)#84211L AS event_sum#84102L, sum(weighted_amount#84099)#84212 AS weighted_amount_sum#84103, avg(amount#84095)#84213 AS avg_amount#84104]
(9) Exchange
Input [7]: [segment#84091, processing_day#84093, row_count#84100L, unique_customers#84101L, event_sum#84102L, weighted_amount_sum#84103, avg_amount#84104]
Arguments: rangepartitioning(segment#84091 ASC NULLS FIRST, processing_day#84093 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=7968]
(10) ShuffleQueryStage
Output [7]: [segment#84091, processing_day#84093, row_count#84100L, unique_customers#84101L, event_sum#84102L, weighted_amount_sum#84103, avg_amount#84104]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#84091, processing_day#84093, row_count#84100L, unique_customers#84101L, event_sum#84102L, weighted_amount_sum#84103, avg_amount#84104]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#84091, processing_day#84093, row_count#84100L, unique_customers#84101L, event_sum#84102L, weighted_amount_sum#84103, avg_amount#84104]
Arguments: [segment#84091 ASC NULLS FIRST, processing_day#84093 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#84091, processing_day#84093, row_count#84100L, unique_customers#84101L, event_sum#84102L, weighted_amount_sum#84103, avg_amount#84104]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#84087L, segment#84091, processing_day#84093, amount#84095, events#84097, weighted_amount#84099]
Keys [2]: [segment#84091, processing_day#84093]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#84087L, 0.05, 0, 0), partial_sum(events#84097), partial_sum(weighted_amount#84099), partial_avg(amount#84095)]
Aggregate Attributes [57]: [count#84318L, MS[0]#84106L, MS[1]#84107L, MS[2]#84108L, MS[3]#84109L, MS[4]#84110L, MS[5]#84111L, MS[6]#84112L, MS[7]#84113L, MS[8]#84114L, MS[9]#84115L, MS[10]#84116L, MS[11]#84117L, MS[12]#84118L, MS[13]#84119L, MS[14]#84120L, MS[15]#84121L, MS[16]#84122L, MS[17]#84123L, MS[18]#84124L, MS[19]#84125L, MS[20]#84126L, MS[21]#84127L, MS[22]#84128L, MS[23]#84129L, MS[24]#84130L, MS[25]#84131L, MS[26]#84132L, MS[27]#84133L, MS[28]#84134L, MS[29]#84135L, MS[30]#84136L, MS[31]#84137L, MS[32]#84138L, MS[33]#84139L, MS[34]#84140L, MS[35]#84141L, MS[36]#84142L, MS[37]#84143L, MS[38]#84144L, MS[39]#84145L, MS[40]#84146L, MS[41]#84147L, MS[42]#84148L, MS[43]#84149L, MS[44]#84150L, MS[45]#84151L, MS[46]#84152L, MS[47]#84153L, MS[48]#84154L, MS[49]#84155L, MS[50]#84156L, MS[51]#84157L, sum#84319L, sum#84320, sum#84321, count#84322L]
Results [59]: [segment#84091, processing_day#84093, count#84323L, MS[0]#84158L, MS[1]#84159L, MS[2]#84160L, MS[3]#84161L, MS[4]#84162L, MS[5]#84163L, MS[6]#84164L, MS[7]#84165L, MS[8]#84166L, MS[9]#84167L, MS[10]#84168L, MS[11]#84169L, MS[12]#84170L, MS[13]#84171L, MS[14]#84172L, MS[15]#84173L, MS[16]#84174L, MS[17]#84175L, MS[18]#84176L, MS[19]#84177L, MS[20]#84178L, MS[21]#84179L, MS[22]#84180L, MS[23]#84181L, MS[24]#84182L, MS[25]#84183L, MS[26]#84184L, MS[27]#84185L, MS[28]#84186L, MS[29]#84187L, MS[30]#84188L, MS[31]#84189L, MS[32]#84190L, MS[33]#84191L, MS[34]#84192L, MS[35]#84193L, MS[36]#84194L, MS[37]#84195L, MS[38]#84196L, MS[39]#84197L, MS[40]#84198L, MS[41]#84199L, MS[42]#84200L, MS[43]#84201L, MS[44]#84202L, MS[45]#84203L, MS[46]#84204L, MS[47]#84205L, MS[48]#84206L, MS[49]#84207L, MS[50]#84208L, MS[51]#84209L, sum#84324L, sum#84325, sum#84326, count#84327L]
(15) Exchange
Input [59]: [segment#84091, processing_day#84093, count#84323L, MS[0]#84158L, MS[1]#84159L, MS[2]#84160L, MS[3]#84161L, MS[4]#84162L, MS[5]#84163L, MS[6]#84164L, MS[7]#84165L, MS[8]#84166L, MS[9]#84167L, MS[10]#84168L, MS[11]#84169L, MS[12]#84170L, MS[13]#84171L, MS[14]#84172L, MS[15]#84173L, MS[16]#84174L, MS[17]#84175L, MS[18]#84176L, MS[19]#84177L, MS[20]#84178L, MS[21]#84179L, MS[22]#84180L, MS[23]#84181L, MS[24]#84182L, MS[25]#84183L, MS[26]#84184L, MS[27]#84185L, MS[28]#84186L, MS[29]#84187L, MS[30]#84188L, MS[31]#84189L, MS[32]#84190L, MS[33]#84191L, MS[34]#84192L, MS[35]#84193L, MS[36]#84194L, MS[37]#84195L, MS[38]#84196L, MS[39]#84197L, MS[40]#84198L, MS[41]#84199L, MS[42]#84200L, MS[43]#84201L, MS[44]#84202L, MS[45]#84203L, MS[46]#84204L, MS[47]#84205L, MS[48]#84206L, MS[49]#84207L, MS[50]#84208L, MS[51]#84209L, sum#84324L, sum#84325, sum#84326, count#84327L]
Arguments: hashpartitioning(segment#84091, processing_day#84093, 200), ENSURE_REQUIREMENTS, [plan_id=7926]
(16) HashAggregate
Input [59]: [segment#84091, processing_day#84093, count#84323L, MS[0]#84158L, MS[1]#84159L, MS[2]#84160L, MS[3]#84161L, MS[4]#84162L, MS[5]#84163L, MS[6]#84164L, MS[7]#84165L, MS[8]#84166L, MS[9]#84167L, MS[10]#84168L, MS[11]#84169L, MS[12]#84170L, MS[13]#84171L, MS[14]#84172L, MS[15]#84173L, MS[16]#84174L, MS[17]#84175L, MS[18]#84176L, MS[19]#84177L, MS[20]#84178L, MS[21]#84179L, MS[22]#84180L, MS[23]#84181L, MS[24]#84182L, MS[25]#84183L, MS[26]#84184L, MS[27]#84185L, MS[28]#84186L, MS[29]#84187L, MS[30]#84188L, MS[31]#84189L, MS[32]#84190L, MS[33]#84191L, MS[34]#84192L, MS[35]#84193L, MS[36]#84194L, MS[37]#84195L, MS[38]#84196L, MS[39]#84197L, MS[40]#84198L, MS[41]#84199L, MS[42]#84200L, MS[43]#84201L, MS[44]#84202L, MS[45]#84203L, MS[46]#84204L, MS[47]#84205L, MS[48]#84206L, MS[49]#84207L, MS[50]#84208L, MS[51]#84209L, sum#84324L, sum#84325, sum#84326, count#84327L]
Keys [2]: [segment#84091, processing_day#84093]
Functions [5]: [count(1), approx_count_distinct(customer_id#84087L, 0.05, 0, 0), sum(events#84097), sum(weighted_amount#84099), avg(amount#84095)]
Aggregate Attributes [5]: [count(1)#84105L, approx_count_distinct(customer_id#84087L, 0.05, 0, 0)#84210L, sum(events#84097)#84211L, sum(weighted_amount#84099)#84212, avg(amount#84095)#84213]
Results [7]: [segment#84091, processing_day#84093, count(1)#84105L AS row_count#84100L, approx_count_distinct(customer_id#84087L, 0.05, 0, 0)#84210L AS unique_customers#84101L, sum(events#84097)#84211L AS event_sum#84102L, sum(weighted_amount#84099)#84212 AS weighted_amount_sum#84103, avg(amount#84095)#84213 AS avg_amount#84104]
(17) Exchange
Input [7]: [segment#84091, processing_day#84093, row_count#84100L, unique_customers#84101L, event_sum#84102L, weighted_amount_sum#84103, avg_amount#84104]
Arguments: rangepartitioning(segment#84091 ASC NULLS FIRST, processing_day#84093 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=7929]
(18) Sort
Input [7]: [segment#84091, processing_day#84093, row_count#84100L, unique_customers#84101L, event_sum#84102L, weighted_amount_sum#84103, avg_amount#84104]
Arguments: [segment#84091 ASC NULLS FIRST, processing_day#84093 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#84091, processing_day#84093, row_count#84100L, unique_customers#84101L, event_sum#84102L, weighted_amount_sum#84103, avg_amount#84104]
Arguments: isFinalPlan=true