== 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#76129L]
Arguments: Range (14000000, 15000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#76129L % 250000) AS customer_id#76131L, concat(segment-, cast(cast((id#76129L % 12) as int) as string)) AS segment#76135, cast((id#76129L % 14) as int) AS processing_day#76137, ((cast(((id#76129L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#76139, cast((((id#76129L * 29) % 7) + 1) as int) AS events#76141]
Input [1]: [id#76129L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#76131L, segment#76135, processing_day#76137, amount#76139, events#76141, (amount#76139 * cast(events#76141 as double)) AS weighted_amount#76143]
Input [5]: [customer_id#76131L, segment#76135, processing_day#76137, amount#76139, events#76141]
(4) HashAggregate
Input [6]: [customer_id#76131L, segment#76135, processing_day#76137, amount#76139, events#76141, weighted_amount#76143]
Keys [2]: [segment#76135, processing_day#76137]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#76131L, 0.05, 0, 0), partial_sum(events#76141), partial_sum(weighted_amount#76143), partial_avg(amount#76139)]
Aggregate Attributes [57]: [count#76362L, MS[0]#76150L, MS[1]#76151L, MS[2]#76152L, MS[3]#76153L, MS[4]#76154L, MS[5]#76155L, MS[6]#76156L, MS[7]#76157L, MS[8]#76158L, MS[9]#76159L, MS[10]#76160L, MS[11]#76161L, MS[12]#76162L, MS[13]#76163L, MS[14]#76164L, MS[15]#76165L, MS[16]#76166L, MS[17]#76167L, MS[18]#76168L, MS[19]#76169L, MS[20]#76170L, MS[21]#76171L, MS[22]#76172L, MS[23]#76173L, MS[24]#76174L, MS[25]#76175L, MS[26]#76176L, MS[27]#76177L, MS[28]#76178L, MS[29]#76179L, MS[30]#76180L, MS[31]#76181L, MS[32]#76182L, MS[33]#76183L, MS[34]#76184L, MS[35]#76185L, MS[36]#76186L, MS[37]#76187L, MS[38]#76188L, MS[39]#76189L, MS[40]#76190L, MS[41]#76191L, MS[42]#76192L, MS[43]#76193L, MS[44]#76194L, MS[45]#76195L, MS[46]#76196L, MS[47]#76197L, MS[48]#76198L, MS[49]#76199L, MS[50]#76200L, MS[51]#76201L, sum#76363L, sum#76364, sum#76365, count#76366L]
Results [59]: [segment#76135, processing_day#76137, count#76367L, MS[0]#76202L, MS[1]#76203L, MS[2]#76204L, MS[3]#76205L, MS[4]#76206L, MS[5]#76207L, MS[6]#76208L, MS[7]#76209L, MS[8]#76210L, MS[9]#76211L, MS[10]#76212L, MS[11]#76213L, MS[12]#76214L, MS[13]#76215L, MS[14]#76216L, MS[15]#76217L, MS[16]#76218L, MS[17]#76219L, MS[18]#76220L, MS[19]#76221L, MS[20]#76222L, MS[21]#76223L, MS[22]#76224L, MS[23]#76225L, MS[24]#76226L, MS[25]#76227L, MS[26]#76228L, MS[27]#76229L, MS[28]#76230L, MS[29]#76231L, MS[30]#76232L, MS[31]#76233L, MS[32]#76234L, MS[33]#76235L, MS[34]#76236L, MS[35]#76237L, MS[36]#76238L, MS[37]#76239L, MS[38]#76240L, MS[39]#76241L, MS[40]#76242L, MS[41]#76243L, MS[42]#76244L, MS[43]#76245L, MS[44]#76246L, MS[45]#76247L, MS[46]#76248L, MS[47]#76249L, MS[48]#76250L, MS[49]#76251L, MS[50]#76252L, MS[51]#76253L, sum#76368L, sum#76369, sum#76370, count#76371L]
(5) Exchange
Input [59]: [segment#76135, processing_day#76137, count#76367L, MS[0]#76202L, MS[1]#76203L, MS[2]#76204L, MS[3]#76205L, MS[4]#76206L, MS[5]#76207L, MS[6]#76208L, MS[7]#76209L, MS[8]#76210L, MS[9]#76211L, MS[10]#76212L, MS[11]#76213L, MS[12]#76214L, MS[13]#76215L, MS[14]#76216L, MS[15]#76217L, MS[16]#76218L, MS[17]#76219L, MS[18]#76220L, MS[19]#76221L, MS[20]#76222L, MS[21]#76223L, MS[22]#76224L, MS[23]#76225L, MS[24]#76226L, MS[25]#76227L, MS[26]#76228L, MS[27]#76229L, MS[28]#76230L, MS[29]#76231L, MS[30]#76232L, MS[31]#76233L, MS[32]#76234L, MS[33]#76235L, MS[34]#76236L, MS[35]#76237L, MS[36]#76238L, MS[37]#76239L, MS[38]#76240L, MS[39]#76241L, MS[40]#76242L, MS[41]#76243L, MS[42]#76244L, MS[43]#76245L, MS[44]#76246L, MS[45]#76247L, MS[46]#76248L, MS[47]#76249L, MS[48]#76250L, MS[49]#76251L, MS[50]#76252L, MS[51]#76253L, sum#76368L, sum#76369, sum#76370, count#76371L]
Arguments: hashpartitioning(segment#76135, processing_day#76137, 200), ENSURE_REQUIREMENTS, [plan_id=7199]
(6) ShuffleQueryStage
Output [59]: [segment#76135, processing_day#76137, count#76367L, MS[0]#76202L, MS[1]#76203L, MS[2]#76204L, MS[3]#76205L, MS[4]#76206L, MS[5]#76207L, MS[6]#76208L, MS[7]#76209L, MS[8]#76210L, MS[9]#76211L, MS[10]#76212L, MS[11]#76213L, MS[12]#76214L, MS[13]#76215L, MS[14]#76216L, MS[15]#76217L, MS[16]#76218L, MS[17]#76219L, MS[18]#76220L, MS[19]#76221L, MS[20]#76222L, MS[21]#76223L, MS[22]#76224L, MS[23]#76225L, MS[24]#76226L, MS[25]#76227L, MS[26]#76228L, MS[27]#76229L, MS[28]#76230L, MS[29]#76231L, MS[30]#76232L, MS[31]#76233L, MS[32]#76234L, MS[33]#76235L, MS[34]#76236L, MS[35]#76237L, MS[36]#76238L, MS[37]#76239L, MS[38]#76240L, MS[39]#76241L, MS[40]#76242L, MS[41]#76243L, MS[42]#76244L, MS[43]#76245L, MS[44]#76246L, MS[45]#76247L, MS[46]#76248L, MS[47]#76249L, MS[48]#76250L, MS[49]#76251L, MS[50]#76252L, MS[51]#76253L, sum#76368L, sum#76369, sum#76370, count#76371L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#76135, processing_day#76137, count#76367L, MS[0]#76202L, MS[1]#76203L, MS[2]#76204L, MS[3]#76205L, MS[4]#76206L, MS[5]#76207L, MS[6]#76208L, MS[7]#76209L, MS[8]#76210L, MS[9]#76211L, MS[10]#76212L, MS[11]#76213L, MS[12]#76214L, MS[13]#76215L, MS[14]#76216L, MS[15]#76217L, MS[16]#76218L, MS[17]#76219L, MS[18]#76220L, MS[19]#76221L, MS[20]#76222L, MS[21]#76223L, MS[22]#76224L, MS[23]#76225L, MS[24]#76226L, MS[25]#76227L, MS[26]#76228L, MS[27]#76229L, MS[28]#76230L, MS[29]#76231L, MS[30]#76232L, MS[31]#76233L, MS[32]#76234L, MS[33]#76235L, MS[34]#76236L, MS[35]#76237L, MS[36]#76238L, MS[37]#76239L, MS[38]#76240L, MS[39]#76241L, MS[40]#76242L, MS[41]#76243L, MS[42]#76244L, MS[43]#76245L, MS[44]#76246L, MS[45]#76247L, MS[46]#76248L, MS[47]#76249L, MS[48]#76250L, MS[49]#76251L, MS[50]#76252L, MS[51]#76253L, sum#76368L, sum#76369, sum#76370, count#76371L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#76135, processing_day#76137, count#76367L, MS[0]#76202L, MS[1]#76203L, MS[2]#76204L, MS[3]#76205L, MS[4]#76206L, MS[5]#76207L, MS[6]#76208L, MS[7]#76209L, MS[8]#76210L, MS[9]#76211L, MS[10]#76212L, MS[11]#76213L, MS[12]#76214L, MS[13]#76215L, MS[14]#76216L, MS[15]#76217L, MS[16]#76218L, MS[17]#76219L, MS[18]#76220L, MS[19]#76221L, MS[20]#76222L, MS[21]#76223L, MS[22]#76224L, MS[23]#76225L, MS[24]#76226L, MS[25]#76227L, MS[26]#76228L, MS[27]#76229L, MS[28]#76230L, MS[29]#76231L, MS[30]#76232L, MS[31]#76233L, MS[32]#76234L, MS[33]#76235L, MS[34]#76236L, MS[35]#76237L, MS[36]#76238L, MS[37]#76239L, MS[38]#76240L, MS[39]#76241L, MS[40]#76242L, MS[41]#76243L, MS[42]#76244L, MS[43]#76245L, MS[44]#76246L, MS[45]#76247L, MS[46]#76248L, MS[47]#76249L, MS[48]#76250L, MS[49]#76251L, MS[50]#76252L, MS[51]#76253L, sum#76368L, sum#76369, sum#76370, count#76371L]
Keys [2]: [segment#76135, processing_day#76137]
Functions [5]: [count(1), approx_count_distinct(customer_id#76131L, 0.05, 0, 0), sum(events#76141), sum(weighted_amount#76143), avg(amount#76139)]
Aggregate Attributes [5]: [count(1)#76149L, approx_count_distinct(customer_id#76131L, 0.05, 0, 0)#76254L, sum(events#76141)#76255L, sum(weighted_amount#76143)#76256, avg(amount#76139)#76257]
Results [7]: [segment#76135, processing_day#76137, count(1)#76149L AS row_count#76144L, approx_count_distinct(customer_id#76131L, 0.05, 0, 0)#76254L AS unique_customers#76145L, sum(events#76141)#76255L AS event_sum#76146L, sum(weighted_amount#76143)#76256 AS weighted_amount_sum#76147, avg(amount#76139)#76257 AS avg_amount#76148]
(9) Exchange
Input [7]: [segment#76135, processing_day#76137, row_count#76144L, unique_customers#76145L, event_sum#76146L, weighted_amount_sum#76147, avg_amount#76148]
Arguments: rangepartitioning(segment#76135 ASC NULLS FIRST, processing_day#76137 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=7221]
(10) ShuffleQueryStage
Output [7]: [segment#76135, processing_day#76137, row_count#76144L, unique_customers#76145L, event_sum#76146L, weighted_amount_sum#76147, avg_amount#76148]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#76135, processing_day#76137, row_count#76144L, unique_customers#76145L, event_sum#76146L, weighted_amount_sum#76147, avg_amount#76148]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#76135, processing_day#76137, row_count#76144L, unique_customers#76145L, event_sum#76146L, weighted_amount_sum#76147, avg_amount#76148]
Arguments: [segment#76135 ASC NULLS FIRST, processing_day#76137 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#76135, processing_day#76137, row_count#76144L, unique_customers#76145L, event_sum#76146L, weighted_amount_sum#76147, avg_amount#76148]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#76131L, segment#76135, processing_day#76137, amount#76139, events#76141, weighted_amount#76143]
Keys [2]: [segment#76135, processing_day#76137]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#76131L, 0.05, 0, 0), partial_sum(events#76141), partial_sum(weighted_amount#76143), partial_avg(amount#76139)]
Aggregate Attributes [57]: [count#76362L, MS[0]#76150L, MS[1]#76151L, MS[2]#76152L, MS[3]#76153L, MS[4]#76154L, MS[5]#76155L, MS[6]#76156L, MS[7]#76157L, MS[8]#76158L, MS[9]#76159L, MS[10]#76160L, MS[11]#76161L, MS[12]#76162L, MS[13]#76163L, MS[14]#76164L, MS[15]#76165L, MS[16]#76166L, MS[17]#76167L, MS[18]#76168L, MS[19]#76169L, MS[20]#76170L, MS[21]#76171L, MS[22]#76172L, MS[23]#76173L, MS[24]#76174L, MS[25]#76175L, MS[26]#76176L, MS[27]#76177L, MS[28]#76178L, MS[29]#76179L, MS[30]#76180L, MS[31]#76181L, MS[32]#76182L, MS[33]#76183L, MS[34]#76184L, MS[35]#76185L, MS[36]#76186L, MS[37]#76187L, MS[38]#76188L, MS[39]#76189L, MS[40]#76190L, MS[41]#76191L, MS[42]#76192L, MS[43]#76193L, MS[44]#76194L, MS[45]#76195L, MS[46]#76196L, MS[47]#76197L, MS[48]#76198L, MS[49]#76199L, MS[50]#76200L, MS[51]#76201L, sum#76363L, sum#76364, sum#76365, count#76366L]
Results [59]: [segment#76135, processing_day#76137, count#76367L, MS[0]#76202L, MS[1]#76203L, MS[2]#76204L, MS[3]#76205L, MS[4]#76206L, MS[5]#76207L, MS[6]#76208L, MS[7]#76209L, MS[8]#76210L, MS[9]#76211L, MS[10]#76212L, MS[11]#76213L, MS[12]#76214L, MS[13]#76215L, MS[14]#76216L, MS[15]#76217L, MS[16]#76218L, MS[17]#76219L, MS[18]#76220L, MS[19]#76221L, MS[20]#76222L, MS[21]#76223L, MS[22]#76224L, MS[23]#76225L, MS[24]#76226L, MS[25]#76227L, MS[26]#76228L, MS[27]#76229L, MS[28]#76230L, MS[29]#76231L, MS[30]#76232L, MS[31]#76233L, MS[32]#76234L, MS[33]#76235L, MS[34]#76236L, MS[35]#76237L, MS[36]#76238L, MS[37]#76239L, MS[38]#76240L, MS[39]#76241L, MS[40]#76242L, MS[41]#76243L, MS[42]#76244L, MS[43]#76245L, MS[44]#76246L, MS[45]#76247L, MS[46]#76248L, MS[47]#76249L, MS[48]#76250L, MS[49]#76251L, MS[50]#76252L, MS[51]#76253L, sum#76368L, sum#76369, sum#76370, count#76371L]
(15) Exchange
Input [59]: [segment#76135, processing_day#76137, count#76367L, MS[0]#76202L, MS[1]#76203L, MS[2]#76204L, MS[3]#76205L, MS[4]#76206L, MS[5]#76207L, MS[6]#76208L, MS[7]#76209L, MS[8]#76210L, MS[9]#76211L, MS[10]#76212L, MS[11]#76213L, MS[12]#76214L, MS[13]#76215L, MS[14]#76216L, MS[15]#76217L, MS[16]#76218L, MS[17]#76219L, MS[18]#76220L, MS[19]#76221L, MS[20]#76222L, MS[21]#76223L, MS[22]#76224L, MS[23]#76225L, MS[24]#76226L, MS[25]#76227L, MS[26]#76228L, MS[27]#76229L, MS[28]#76230L, MS[29]#76231L, MS[30]#76232L, MS[31]#76233L, MS[32]#76234L, MS[33]#76235L, MS[34]#76236L, MS[35]#76237L, MS[36]#76238L, MS[37]#76239L, MS[38]#76240L, MS[39]#76241L, MS[40]#76242L, MS[41]#76243L, MS[42]#76244L, MS[43]#76245L, MS[44]#76246L, MS[45]#76247L, MS[46]#76248L, MS[47]#76249L, MS[48]#76250L, MS[49]#76251L, MS[50]#76252L, MS[51]#76253L, sum#76368L, sum#76369, sum#76370, count#76371L]
Arguments: hashpartitioning(segment#76135, processing_day#76137, 200), ENSURE_REQUIREMENTS, [plan_id=7179]
(16) HashAggregate
Input [59]: [segment#76135, processing_day#76137, count#76367L, MS[0]#76202L, MS[1]#76203L, MS[2]#76204L, MS[3]#76205L, MS[4]#76206L, MS[5]#76207L, MS[6]#76208L, MS[7]#76209L, MS[8]#76210L, MS[9]#76211L, MS[10]#76212L, MS[11]#76213L, MS[12]#76214L, MS[13]#76215L, MS[14]#76216L, MS[15]#76217L, MS[16]#76218L, MS[17]#76219L, MS[18]#76220L, MS[19]#76221L, MS[20]#76222L, MS[21]#76223L, MS[22]#76224L, MS[23]#76225L, MS[24]#76226L, MS[25]#76227L, MS[26]#76228L, MS[27]#76229L, MS[28]#76230L, MS[29]#76231L, MS[30]#76232L, MS[31]#76233L, MS[32]#76234L, MS[33]#76235L, MS[34]#76236L, MS[35]#76237L, MS[36]#76238L, MS[37]#76239L, MS[38]#76240L, MS[39]#76241L, MS[40]#76242L, MS[41]#76243L, MS[42]#76244L, MS[43]#76245L, MS[44]#76246L, MS[45]#76247L, MS[46]#76248L, MS[47]#76249L, MS[48]#76250L, MS[49]#76251L, MS[50]#76252L, MS[51]#76253L, sum#76368L, sum#76369, sum#76370, count#76371L]
Keys [2]: [segment#76135, processing_day#76137]
Functions [5]: [count(1), approx_count_distinct(customer_id#76131L, 0.05, 0, 0), sum(events#76141), sum(weighted_amount#76143), avg(amount#76139)]
Aggregate Attributes [5]: [count(1)#76149L, approx_count_distinct(customer_id#76131L, 0.05, 0, 0)#76254L, sum(events#76141)#76255L, sum(weighted_amount#76143)#76256, avg(amount#76139)#76257]
Results [7]: [segment#76135, processing_day#76137, count(1)#76149L AS row_count#76144L, approx_count_distinct(customer_id#76131L, 0.05, 0, 0)#76254L AS unique_customers#76145L, sum(events#76141)#76255L AS event_sum#76146L, sum(weighted_amount#76143)#76256 AS weighted_amount_sum#76147, avg(amount#76139)#76257 AS avg_amount#76148]
(17) Exchange
Input [7]: [segment#76135, processing_day#76137, row_count#76144L, unique_customers#76145L, event_sum#76146L, weighted_amount_sum#76147, avg_amount#76148]
Arguments: rangepartitioning(segment#76135 ASC NULLS FIRST, processing_day#76137 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=7182]
(18) Sort
Input [7]: [segment#76135, processing_day#76137, row_count#76144L, unique_customers#76145L, event_sum#76146L, weighted_amount_sum#76147, avg_amount#76148]
Arguments: [segment#76135 ASC NULLS FIRST, processing_day#76137 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#76135, processing_day#76137, row_count#76144L, unique_customers#76145L, event_sum#76146L, weighted_amount_sum#76147, avg_amount#76148]
Arguments: isFinalPlan=true