== 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#94727L]
Arguments: Range (11000000, 12000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#94727L % 250000) AS customer_id#94729L, concat(segment-, cast(cast((id#94727L % 12) as int) as string)) AS segment#94733, cast((id#94727L % 14) as int) AS processing_day#94735, ((cast(((id#94727L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#94737, cast((((id#94727L * 29) % 7) + 1) as int) AS events#94739]
Input [1]: [id#94727L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#94729L, segment#94733, processing_day#94735, amount#94737, events#94739, (amount#94737 * cast(events#94739 as double)) AS weighted_amount#94741]
Input [5]: [customer_id#94729L, segment#94733, processing_day#94735, amount#94737, events#94739]
(4) HashAggregate
Input [6]: [customer_id#94729L, segment#94733, processing_day#94735, amount#94737, events#94739, weighted_amount#94741]
Keys [2]: [segment#94733, processing_day#94735]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#94729L, 0.05, 0, 0), partial_sum(events#94739), partial_sum(weighted_amount#94741), partial_avg(amount#94737)]
Aggregate Attributes [57]: [count#94960L, MS[0]#94748L, MS[1]#94749L, MS[2]#94750L, MS[3]#94751L, MS[4]#94752L, MS[5]#94753L, MS[6]#94754L, MS[7]#94755L, MS[8]#94756L, MS[9]#94757L, MS[10]#94758L, MS[11]#94759L, MS[12]#94760L, MS[13]#94761L, MS[14]#94762L, MS[15]#94763L, MS[16]#94764L, MS[17]#94765L, MS[18]#94766L, MS[19]#94767L, MS[20]#94768L, MS[21]#94769L, MS[22]#94770L, MS[23]#94771L, MS[24]#94772L, MS[25]#94773L, MS[26]#94774L, MS[27]#94775L, MS[28]#94776L, MS[29]#94777L, MS[30]#94778L, MS[31]#94779L, MS[32]#94780L, MS[33]#94781L, MS[34]#94782L, MS[35]#94783L, MS[36]#94784L, MS[37]#94785L, MS[38]#94786L, MS[39]#94787L, MS[40]#94788L, MS[41]#94789L, MS[42]#94790L, MS[43]#94791L, MS[44]#94792L, MS[45]#94793L, MS[46]#94794L, MS[47]#94795L, MS[48]#94796L, MS[49]#94797L, MS[50]#94798L, MS[51]#94799L, sum#94961L, sum#94962, sum#94963, count#94964L]
Results [59]: [segment#94733, processing_day#94735, count#94965L, MS[0]#94800L, MS[1]#94801L, MS[2]#94802L, MS[3]#94803L, MS[4]#94804L, MS[5]#94805L, MS[6]#94806L, MS[7]#94807L, MS[8]#94808L, MS[9]#94809L, MS[10]#94810L, MS[11]#94811L, MS[12]#94812L, MS[13]#94813L, MS[14]#94814L, MS[15]#94815L, MS[16]#94816L, MS[17]#94817L, MS[18]#94818L, MS[19]#94819L, MS[20]#94820L, MS[21]#94821L, MS[22]#94822L, MS[23]#94823L, MS[24]#94824L, MS[25]#94825L, MS[26]#94826L, MS[27]#94827L, MS[28]#94828L, MS[29]#94829L, MS[30]#94830L, MS[31]#94831L, MS[32]#94832L, MS[33]#94833L, MS[34]#94834L, MS[35]#94835L, MS[36]#94836L, MS[37]#94837L, MS[38]#94838L, MS[39]#94839L, MS[40]#94840L, MS[41]#94841L, MS[42]#94842L, MS[43]#94843L, MS[44]#94844L, MS[45]#94845L, MS[46]#94846L, MS[47]#94847L, MS[48]#94848L, MS[49]#94849L, MS[50]#94850L, MS[51]#94851L, sum#94966L, sum#94967, sum#94968, count#94969L]
(5) Exchange
Input [59]: [segment#94733, processing_day#94735, count#94965L, MS[0]#94800L, MS[1]#94801L, MS[2]#94802L, MS[3]#94803L, MS[4]#94804L, MS[5]#94805L, MS[6]#94806L, MS[7]#94807L, MS[8]#94808L, MS[9]#94809L, MS[10]#94810L, MS[11]#94811L, MS[12]#94812L, MS[13]#94813L, MS[14]#94814L, MS[15]#94815L, MS[16]#94816L, MS[17]#94817L, MS[18]#94818L, MS[19]#94819L, MS[20]#94820L, MS[21]#94821L, MS[22]#94822L, MS[23]#94823L, MS[24]#94824L, MS[25]#94825L, MS[26]#94826L, MS[27]#94827L, MS[28]#94828L, MS[29]#94829L, MS[30]#94830L, MS[31]#94831L, MS[32]#94832L, MS[33]#94833L, MS[34]#94834L, MS[35]#94835L, MS[36]#94836L, MS[37]#94837L, MS[38]#94838L, MS[39]#94839L, MS[40]#94840L, MS[41]#94841L, MS[42]#94842L, MS[43]#94843L, MS[44]#94844L, MS[45]#94845L, MS[46]#94846L, MS[47]#94847L, MS[48]#94848L, MS[49]#94849L, MS[50]#94850L, MS[51]#94851L, sum#94966L, sum#94967, sum#94968, count#94969L]
Arguments: hashpartitioning(segment#94733, processing_day#94735, 200), ENSURE_REQUIREMENTS, [plan_id=8948]
(6) ShuffleQueryStage
Output [59]: [segment#94733, processing_day#94735, count#94965L, MS[0]#94800L, MS[1]#94801L, MS[2]#94802L, MS[3]#94803L, MS[4]#94804L, MS[5]#94805L, MS[6]#94806L, MS[7]#94807L, MS[8]#94808L, MS[9]#94809L, MS[10]#94810L, MS[11]#94811L, MS[12]#94812L, MS[13]#94813L, MS[14]#94814L, MS[15]#94815L, MS[16]#94816L, MS[17]#94817L, MS[18]#94818L, MS[19]#94819L, MS[20]#94820L, MS[21]#94821L, MS[22]#94822L, MS[23]#94823L, MS[24]#94824L, MS[25]#94825L, MS[26]#94826L, MS[27]#94827L, MS[28]#94828L, MS[29]#94829L, MS[30]#94830L, MS[31]#94831L, MS[32]#94832L, MS[33]#94833L, MS[34]#94834L, MS[35]#94835L, MS[36]#94836L, MS[37]#94837L, MS[38]#94838L, MS[39]#94839L, MS[40]#94840L, MS[41]#94841L, MS[42]#94842L, MS[43]#94843L, MS[44]#94844L, MS[45]#94845L, MS[46]#94846L, MS[47]#94847L, MS[48]#94848L, MS[49]#94849L, MS[50]#94850L, MS[51]#94851L, sum#94966L, sum#94967, sum#94968, count#94969L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#94733, processing_day#94735, count#94965L, MS[0]#94800L, MS[1]#94801L, MS[2]#94802L, MS[3]#94803L, MS[4]#94804L, MS[5]#94805L, MS[6]#94806L, MS[7]#94807L, MS[8]#94808L, MS[9]#94809L, MS[10]#94810L, MS[11]#94811L, MS[12]#94812L, MS[13]#94813L, MS[14]#94814L, MS[15]#94815L, MS[16]#94816L, MS[17]#94817L, MS[18]#94818L, MS[19]#94819L, MS[20]#94820L, MS[21]#94821L, MS[22]#94822L, MS[23]#94823L, MS[24]#94824L, MS[25]#94825L, MS[26]#94826L, MS[27]#94827L, MS[28]#94828L, MS[29]#94829L, MS[30]#94830L, MS[31]#94831L, MS[32]#94832L, MS[33]#94833L, MS[34]#94834L, MS[35]#94835L, MS[36]#94836L, MS[37]#94837L, MS[38]#94838L, MS[39]#94839L, MS[40]#94840L, MS[41]#94841L, MS[42]#94842L, MS[43]#94843L, MS[44]#94844L, MS[45]#94845L, MS[46]#94846L, MS[47]#94847L, MS[48]#94848L, MS[49]#94849L, MS[50]#94850L, MS[51]#94851L, sum#94966L, sum#94967, sum#94968, count#94969L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#94733, processing_day#94735, count#94965L, MS[0]#94800L, MS[1]#94801L, MS[2]#94802L, MS[3]#94803L, MS[4]#94804L, MS[5]#94805L, MS[6]#94806L, MS[7]#94807L, MS[8]#94808L, MS[9]#94809L, MS[10]#94810L, MS[11]#94811L, MS[12]#94812L, MS[13]#94813L, MS[14]#94814L, MS[15]#94815L, MS[16]#94816L, MS[17]#94817L, MS[18]#94818L, MS[19]#94819L, MS[20]#94820L, MS[21]#94821L, MS[22]#94822L, MS[23]#94823L, MS[24]#94824L, MS[25]#94825L, MS[26]#94826L, MS[27]#94827L, MS[28]#94828L, MS[29]#94829L, MS[30]#94830L, MS[31]#94831L, MS[32]#94832L, MS[33]#94833L, MS[34]#94834L, MS[35]#94835L, MS[36]#94836L, MS[37]#94837L, MS[38]#94838L, MS[39]#94839L, MS[40]#94840L, MS[41]#94841L, MS[42]#94842L, MS[43]#94843L, MS[44]#94844L, MS[45]#94845L, MS[46]#94846L, MS[47]#94847L, MS[48]#94848L, MS[49]#94849L, MS[50]#94850L, MS[51]#94851L, sum#94966L, sum#94967, sum#94968, count#94969L]
Keys [2]: [segment#94733, processing_day#94735]
Functions [5]: [count(1), approx_count_distinct(customer_id#94729L, 0.05, 0, 0), sum(events#94739), sum(weighted_amount#94741), avg(amount#94737)]
Aggregate Attributes [5]: [count(1)#94747L, approx_count_distinct(customer_id#94729L, 0.05, 0, 0)#94852L, sum(events#94739)#94853L, sum(weighted_amount#94741)#94854, avg(amount#94737)#94855]
Results [7]: [segment#94733, processing_day#94735, count(1)#94747L AS row_count#94742L, approx_count_distinct(customer_id#94729L, 0.05, 0, 0)#94852L AS unique_customers#94743L, sum(events#94739)#94853L AS event_sum#94744L, sum(weighted_amount#94741)#94854 AS weighted_amount_sum#94745, avg(amount#94737)#94855 AS avg_amount#94746]
(9) Exchange
Input [7]: [segment#94733, processing_day#94735, row_count#94742L, unique_customers#94743L, event_sum#94744L, weighted_amount_sum#94745, avg_amount#94746]
Arguments: rangepartitioning(segment#94733 ASC NULLS FIRST, processing_day#94735 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=8970]
(10) ShuffleQueryStage
Output [7]: [segment#94733, processing_day#94735, row_count#94742L, unique_customers#94743L, event_sum#94744L, weighted_amount_sum#94745, avg_amount#94746]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#94733, processing_day#94735, row_count#94742L, unique_customers#94743L, event_sum#94744L, weighted_amount_sum#94745, avg_amount#94746]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#94733, processing_day#94735, row_count#94742L, unique_customers#94743L, event_sum#94744L, weighted_amount_sum#94745, avg_amount#94746]
Arguments: [segment#94733 ASC NULLS FIRST, processing_day#94735 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#94733, processing_day#94735, row_count#94742L, unique_customers#94743L, event_sum#94744L, weighted_amount_sum#94745, avg_amount#94746]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#94729L, segment#94733, processing_day#94735, amount#94737, events#94739, weighted_amount#94741]
Keys [2]: [segment#94733, processing_day#94735]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#94729L, 0.05, 0, 0), partial_sum(events#94739), partial_sum(weighted_amount#94741), partial_avg(amount#94737)]
Aggregate Attributes [57]: [count#94960L, MS[0]#94748L, MS[1]#94749L, MS[2]#94750L, MS[3]#94751L, MS[4]#94752L, MS[5]#94753L, MS[6]#94754L, MS[7]#94755L, MS[8]#94756L, MS[9]#94757L, MS[10]#94758L, MS[11]#94759L, MS[12]#94760L, MS[13]#94761L, MS[14]#94762L, MS[15]#94763L, MS[16]#94764L, MS[17]#94765L, MS[18]#94766L, MS[19]#94767L, MS[20]#94768L, MS[21]#94769L, MS[22]#94770L, MS[23]#94771L, MS[24]#94772L, MS[25]#94773L, MS[26]#94774L, MS[27]#94775L, MS[28]#94776L, MS[29]#94777L, MS[30]#94778L, MS[31]#94779L, MS[32]#94780L, MS[33]#94781L, MS[34]#94782L, MS[35]#94783L, MS[36]#94784L, MS[37]#94785L, MS[38]#94786L, MS[39]#94787L, MS[40]#94788L, MS[41]#94789L, MS[42]#94790L, MS[43]#94791L, MS[44]#94792L, MS[45]#94793L, MS[46]#94794L, MS[47]#94795L, MS[48]#94796L, MS[49]#94797L, MS[50]#94798L, MS[51]#94799L, sum#94961L, sum#94962, sum#94963, count#94964L]
Results [59]: [segment#94733, processing_day#94735, count#94965L, MS[0]#94800L, MS[1]#94801L, MS[2]#94802L, MS[3]#94803L, MS[4]#94804L, MS[5]#94805L, MS[6]#94806L, MS[7]#94807L, MS[8]#94808L, MS[9]#94809L, MS[10]#94810L, MS[11]#94811L, MS[12]#94812L, MS[13]#94813L, MS[14]#94814L, MS[15]#94815L, MS[16]#94816L, MS[17]#94817L, MS[18]#94818L, MS[19]#94819L, MS[20]#94820L, MS[21]#94821L, MS[22]#94822L, MS[23]#94823L, MS[24]#94824L, MS[25]#94825L, MS[26]#94826L, MS[27]#94827L, MS[28]#94828L, MS[29]#94829L, MS[30]#94830L, MS[31]#94831L, MS[32]#94832L, MS[33]#94833L, MS[34]#94834L, MS[35]#94835L, MS[36]#94836L, MS[37]#94837L, MS[38]#94838L, MS[39]#94839L, MS[40]#94840L, MS[41]#94841L, MS[42]#94842L, MS[43]#94843L, MS[44]#94844L, MS[45]#94845L, MS[46]#94846L, MS[47]#94847L, MS[48]#94848L, MS[49]#94849L, MS[50]#94850L, MS[51]#94851L, sum#94966L, sum#94967, sum#94968, count#94969L]
(15) Exchange
Input [59]: [segment#94733, processing_day#94735, count#94965L, MS[0]#94800L, MS[1]#94801L, MS[2]#94802L, MS[3]#94803L, MS[4]#94804L, MS[5]#94805L, MS[6]#94806L, MS[7]#94807L, MS[8]#94808L, MS[9]#94809L, MS[10]#94810L, MS[11]#94811L, MS[12]#94812L, MS[13]#94813L, MS[14]#94814L, MS[15]#94815L, MS[16]#94816L, MS[17]#94817L, MS[18]#94818L, MS[19]#94819L, MS[20]#94820L, MS[21]#94821L, MS[22]#94822L, MS[23]#94823L, MS[24]#94824L, MS[25]#94825L, MS[26]#94826L, MS[27]#94827L, MS[28]#94828L, MS[29]#94829L, MS[30]#94830L, MS[31]#94831L, MS[32]#94832L, MS[33]#94833L, MS[34]#94834L, MS[35]#94835L, MS[36]#94836L, MS[37]#94837L, MS[38]#94838L, MS[39]#94839L, MS[40]#94840L, MS[41]#94841L, MS[42]#94842L, MS[43]#94843L, MS[44]#94844L, MS[45]#94845L, MS[46]#94846L, MS[47]#94847L, MS[48]#94848L, MS[49]#94849L, MS[50]#94850L, MS[51]#94851L, sum#94966L, sum#94967, sum#94968, count#94969L]
Arguments: hashpartitioning(segment#94733, processing_day#94735, 200), ENSURE_REQUIREMENTS, [plan_id=8928]
(16) HashAggregate
Input [59]: [segment#94733, processing_day#94735, count#94965L, MS[0]#94800L, MS[1]#94801L, MS[2]#94802L, MS[3]#94803L, MS[4]#94804L, MS[5]#94805L, MS[6]#94806L, MS[7]#94807L, MS[8]#94808L, MS[9]#94809L, MS[10]#94810L, MS[11]#94811L, MS[12]#94812L, MS[13]#94813L, MS[14]#94814L, MS[15]#94815L, MS[16]#94816L, MS[17]#94817L, MS[18]#94818L, MS[19]#94819L, MS[20]#94820L, MS[21]#94821L, MS[22]#94822L, MS[23]#94823L, MS[24]#94824L, MS[25]#94825L, MS[26]#94826L, MS[27]#94827L, MS[28]#94828L, MS[29]#94829L, MS[30]#94830L, MS[31]#94831L, MS[32]#94832L, MS[33]#94833L, MS[34]#94834L, MS[35]#94835L, MS[36]#94836L, MS[37]#94837L, MS[38]#94838L, MS[39]#94839L, MS[40]#94840L, MS[41]#94841L, MS[42]#94842L, MS[43]#94843L, MS[44]#94844L, MS[45]#94845L, MS[46]#94846L, MS[47]#94847L, MS[48]#94848L, MS[49]#94849L, MS[50]#94850L, MS[51]#94851L, sum#94966L, sum#94967, sum#94968, count#94969L]
Keys [2]: [segment#94733, processing_day#94735]
Functions [5]: [count(1), approx_count_distinct(customer_id#94729L, 0.05, 0, 0), sum(events#94739), sum(weighted_amount#94741), avg(amount#94737)]
Aggregate Attributes [5]: [count(1)#94747L, approx_count_distinct(customer_id#94729L, 0.05, 0, 0)#94852L, sum(events#94739)#94853L, sum(weighted_amount#94741)#94854, avg(amount#94737)#94855]
Results [7]: [segment#94733, processing_day#94735, count(1)#94747L AS row_count#94742L, approx_count_distinct(customer_id#94729L, 0.05, 0, 0)#94852L AS unique_customers#94743L, sum(events#94739)#94853L AS event_sum#94744L, sum(weighted_amount#94741)#94854 AS weighted_amount_sum#94745, avg(amount#94737)#94855 AS avg_amount#94746]
(17) Exchange
Input [7]: [segment#94733, processing_day#94735, row_count#94742L, unique_customers#94743L, event_sum#94744L, weighted_amount_sum#94745, avg_amount#94746]
Arguments: rangepartitioning(segment#94733 ASC NULLS FIRST, processing_day#94735 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=8931]
(18) Sort
Input [7]: [segment#94733, processing_day#94735, row_count#94742L, unique_customers#94743L, event_sum#94744L, weighted_amount_sum#94745, avg_amount#94746]
Arguments: [segment#94733 ASC NULLS FIRST, processing_day#94735 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#94733, processing_day#94735, row_count#94742L, unique_customers#94743L, event_sum#94744L, weighted_amount_sum#94745, avg_amount#94746]
Arguments: isFinalPlan=true