== 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#63753L]
Arguments: Range (0, 1000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#63753L % 250000) AS customer_id#63755L, concat(segment-, cast(cast((id#63753L % 12) as int) as string)) AS segment#63759, cast((id#63753L % 14) as int) AS processing_day#63761, ((cast(((id#63753L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#63763, cast((((id#63753L * 29) % 7) + 1) as int) AS events#63765]
Input [1]: [id#63753L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#63755L, segment#63759, processing_day#63761, amount#63763, events#63765, (amount#63763 * cast(events#63765 as double)) AS weighted_amount#63767]
Input [5]: [customer_id#63755L, segment#63759, processing_day#63761, amount#63763, events#63765]
(4) HashAggregate
Input [6]: [customer_id#63755L, segment#63759, processing_day#63761, amount#63763, events#63765, weighted_amount#63767]
Keys [2]: [segment#63759, processing_day#63761]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#63755L, 0.05, 0, 0), partial_sum(events#63765), partial_sum(weighted_amount#63767), partial_avg(amount#63763)]
Aggregate Attributes [57]: [count#63986L, MS[0]#63774L, MS[1]#63775L, MS[2]#63776L, MS[3]#63777L, MS[4]#63778L, MS[5]#63779L, MS[6]#63780L, MS[7]#63781L, MS[8]#63782L, MS[9]#63783L, MS[10]#63784L, MS[11]#63785L, MS[12]#63786L, MS[13]#63787L, MS[14]#63788L, MS[15]#63789L, MS[16]#63790L, MS[17]#63791L, MS[18]#63792L, MS[19]#63793L, MS[20]#63794L, MS[21]#63795L, MS[22]#63796L, MS[23]#63797L, MS[24]#63798L, MS[25]#63799L, MS[26]#63800L, MS[27]#63801L, MS[28]#63802L, MS[29]#63803L, MS[30]#63804L, MS[31]#63805L, MS[32]#63806L, MS[33]#63807L, MS[34]#63808L, MS[35]#63809L, MS[36]#63810L, MS[37]#63811L, MS[38]#63812L, MS[39]#63813L, MS[40]#63814L, MS[41]#63815L, MS[42]#63816L, MS[43]#63817L, MS[44]#63818L, MS[45]#63819L, MS[46]#63820L, MS[47]#63821L, MS[48]#63822L, MS[49]#63823L, MS[50]#63824L, MS[51]#63825L, sum#63987L, sum#63988, sum#63989, count#63990L]
Results [59]: [segment#63759, processing_day#63761, count#63991L, MS[0]#63826L, MS[1]#63827L, MS[2]#63828L, MS[3]#63829L, MS[4]#63830L, MS[5]#63831L, MS[6]#63832L, MS[7]#63833L, MS[8]#63834L, MS[9]#63835L, MS[10]#63836L, MS[11]#63837L, MS[12]#63838L, MS[13]#63839L, MS[14]#63840L, MS[15]#63841L, MS[16]#63842L, MS[17]#63843L, MS[18]#63844L, MS[19]#63845L, MS[20]#63846L, MS[21]#63847L, MS[22]#63848L, MS[23]#63849L, MS[24]#63850L, MS[25]#63851L, MS[26]#63852L, MS[27]#63853L, MS[28]#63854L, MS[29]#63855L, MS[30]#63856L, MS[31]#63857L, MS[32]#63858L, MS[33]#63859L, MS[34]#63860L, MS[35]#63861L, MS[36]#63862L, MS[37]#63863L, MS[38]#63864L, MS[39]#63865L, MS[40]#63866L, MS[41]#63867L, MS[42]#63868L, MS[43]#63869L, MS[44]#63870L, MS[45]#63871L, MS[46]#63872L, MS[47]#63873L, MS[48]#63874L, MS[49]#63875L, MS[50]#63876L, MS[51]#63877L, sum#63992L, sum#63993, sum#63994, count#63995L]
(5) Exchange
Input [59]: [segment#63759, processing_day#63761, count#63991L, MS[0]#63826L, MS[1]#63827L, MS[2]#63828L, MS[3]#63829L, MS[4]#63830L, MS[5]#63831L, MS[6]#63832L, MS[7]#63833L, MS[8]#63834L, MS[9]#63835L, MS[10]#63836L, MS[11]#63837L, MS[12]#63838L, MS[13]#63839L, MS[14]#63840L, MS[15]#63841L, MS[16]#63842L, MS[17]#63843L, MS[18]#63844L, MS[19]#63845L, MS[20]#63846L, MS[21]#63847L, MS[22]#63848L, MS[23]#63849L, MS[24]#63850L, MS[25]#63851L, MS[26]#63852L, MS[27]#63853L, MS[28]#63854L, MS[29]#63855L, MS[30]#63856L, MS[31]#63857L, MS[32]#63858L, MS[33]#63859L, MS[34]#63860L, MS[35]#63861L, MS[36]#63862L, MS[37]#63863L, MS[38]#63864L, MS[39]#63865L, MS[40]#63866L, MS[41]#63867L, MS[42]#63868L, MS[43]#63869L, MS[44]#63870L, MS[45]#63871L, MS[46]#63872L, MS[47]#63873L, MS[48]#63874L, MS[49]#63875L, MS[50]#63876L, MS[51]#63877L, sum#63992L, sum#63993, sum#63994, count#63995L]
Arguments: hashpartitioning(segment#63759, processing_day#63761, 200), ENSURE_REQUIREMENTS, [plan_id=6037]
(6) ShuffleQueryStage
Output [59]: [segment#63759, processing_day#63761, count#63991L, MS[0]#63826L, MS[1]#63827L, MS[2]#63828L, MS[3]#63829L, MS[4]#63830L, MS[5]#63831L, MS[6]#63832L, MS[7]#63833L, MS[8]#63834L, MS[9]#63835L, MS[10]#63836L, MS[11]#63837L, MS[12]#63838L, MS[13]#63839L, MS[14]#63840L, MS[15]#63841L, MS[16]#63842L, MS[17]#63843L, MS[18]#63844L, MS[19]#63845L, MS[20]#63846L, MS[21]#63847L, MS[22]#63848L, MS[23]#63849L, MS[24]#63850L, MS[25]#63851L, MS[26]#63852L, MS[27]#63853L, MS[28]#63854L, MS[29]#63855L, MS[30]#63856L, MS[31]#63857L, MS[32]#63858L, MS[33]#63859L, MS[34]#63860L, MS[35]#63861L, MS[36]#63862L, MS[37]#63863L, MS[38]#63864L, MS[39]#63865L, MS[40]#63866L, MS[41]#63867L, MS[42]#63868L, MS[43]#63869L, MS[44]#63870L, MS[45]#63871L, MS[46]#63872L, MS[47]#63873L, MS[48]#63874L, MS[49]#63875L, MS[50]#63876L, MS[51]#63877L, sum#63992L, sum#63993, sum#63994, count#63995L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#63759, processing_day#63761, count#63991L, MS[0]#63826L, MS[1]#63827L, MS[2]#63828L, MS[3]#63829L, MS[4]#63830L, MS[5]#63831L, MS[6]#63832L, MS[7]#63833L, MS[8]#63834L, MS[9]#63835L, MS[10]#63836L, MS[11]#63837L, MS[12]#63838L, MS[13]#63839L, MS[14]#63840L, MS[15]#63841L, MS[16]#63842L, MS[17]#63843L, MS[18]#63844L, MS[19]#63845L, MS[20]#63846L, MS[21]#63847L, MS[22]#63848L, MS[23]#63849L, MS[24]#63850L, MS[25]#63851L, MS[26]#63852L, MS[27]#63853L, MS[28]#63854L, MS[29]#63855L, MS[30]#63856L, MS[31]#63857L, MS[32]#63858L, MS[33]#63859L, MS[34]#63860L, MS[35]#63861L, MS[36]#63862L, MS[37]#63863L, MS[38]#63864L, MS[39]#63865L, MS[40]#63866L, MS[41]#63867L, MS[42]#63868L, MS[43]#63869L, MS[44]#63870L, MS[45]#63871L, MS[46]#63872L, MS[47]#63873L, MS[48]#63874L, MS[49]#63875L, MS[50]#63876L, MS[51]#63877L, sum#63992L, sum#63993, sum#63994, count#63995L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#63759, processing_day#63761, count#63991L, MS[0]#63826L, MS[1]#63827L, MS[2]#63828L, MS[3]#63829L, MS[4]#63830L, MS[5]#63831L, MS[6]#63832L, MS[7]#63833L, MS[8]#63834L, MS[9]#63835L, MS[10]#63836L, MS[11]#63837L, MS[12]#63838L, MS[13]#63839L, MS[14]#63840L, MS[15]#63841L, MS[16]#63842L, MS[17]#63843L, MS[18]#63844L, MS[19]#63845L, MS[20]#63846L, MS[21]#63847L, MS[22]#63848L, MS[23]#63849L, MS[24]#63850L, MS[25]#63851L, MS[26]#63852L, MS[27]#63853L, MS[28]#63854L, MS[29]#63855L, MS[30]#63856L, MS[31]#63857L, MS[32]#63858L, MS[33]#63859L, MS[34]#63860L, MS[35]#63861L, MS[36]#63862L, MS[37]#63863L, MS[38]#63864L, MS[39]#63865L, MS[40]#63866L, MS[41]#63867L, MS[42]#63868L, MS[43]#63869L, MS[44]#63870L, MS[45]#63871L, MS[46]#63872L, MS[47]#63873L, MS[48]#63874L, MS[49]#63875L, MS[50]#63876L, MS[51]#63877L, sum#63992L, sum#63993, sum#63994, count#63995L]
Keys [2]: [segment#63759, processing_day#63761]
Functions [5]: [count(1), approx_count_distinct(customer_id#63755L, 0.05, 0, 0), sum(events#63765), sum(weighted_amount#63767), avg(amount#63763)]
Aggregate Attributes [5]: [count(1)#63773L, approx_count_distinct(customer_id#63755L, 0.05, 0, 0)#63878L, sum(events#63765)#63879L, sum(weighted_amount#63767)#63880, avg(amount#63763)#63881]
Results [7]: [segment#63759, processing_day#63761, count(1)#63773L AS row_count#63768L, approx_count_distinct(customer_id#63755L, 0.05, 0, 0)#63878L AS unique_customers#63769L, sum(events#63765)#63879L AS event_sum#63770L, sum(weighted_amount#63767)#63880 AS weighted_amount_sum#63771, avg(amount#63763)#63881 AS avg_amount#63772]
(9) Exchange
Input [7]: [segment#63759, processing_day#63761, row_count#63768L, unique_customers#63769L, event_sum#63770L, weighted_amount_sum#63771, avg_amount#63772]
Arguments: rangepartitioning(segment#63759 ASC NULLS FIRST, processing_day#63761 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=6059]
(10) ShuffleQueryStage
Output [7]: [segment#63759, processing_day#63761, row_count#63768L, unique_customers#63769L, event_sum#63770L, weighted_amount_sum#63771, avg_amount#63772]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#63759, processing_day#63761, row_count#63768L, unique_customers#63769L, event_sum#63770L, weighted_amount_sum#63771, avg_amount#63772]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#63759, processing_day#63761, row_count#63768L, unique_customers#63769L, event_sum#63770L, weighted_amount_sum#63771, avg_amount#63772]
Arguments: [segment#63759 ASC NULLS FIRST, processing_day#63761 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#63759, processing_day#63761, row_count#63768L, unique_customers#63769L, event_sum#63770L, weighted_amount_sum#63771, avg_amount#63772]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#63755L, segment#63759, processing_day#63761, amount#63763, events#63765, weighted_amount#63767]
Keys [2]: [segment#63759, processing_day#63761]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#63755L, 0.05, 0, 0), partial_sum(events#63765), partial_sum(weighted_amount#63767), partial_avg(amount#63763)]
Aggregate Attributes [57]: [count#63986L, MS[0]#63774L, MS[1]#63775L, MS[2]#63776L, MS[3]#63777L, MS[4]#63778L, MS[5]#63779L, MS[6]#63780L, MS[7]#63781L, MS[8]#63782L, MS[9]#63783L, MS[10]#63784L, MS[11]#63785L, MS[12]#63786L, MS[13]#63787L, MS[14]#63788L, MS[15]#63789L, MS[16]#63790L, MS[17]#63791L, MS[18]#63792L, MS[19]#63793L, MS[20]#63794L, MS[21]#63795L, MS[22]#63796L, MS[23]#63797L, MS[24]#63798L, MS[25]#63799L, MS[26]#63800L, MS[27]#63801L, MS[28]#63802L, MS[29]#63803L, MS[30]#63804L, MS[31]#63805L, MS[32]#63806L, MS[33]#63807L, MS[34]#63808L, MS[35]#63809L, MS[36]#63810L, MS[37]#63811L, MS[38]#63812L, MS[39]#63813L, MS[40]#63814L, MS[41]#63815L, MS[42]#63816L, MS[43]#63817L, MS[44]#63818L, MS[45]#63819L, MS[46]#63820L, MS[47]#63821L, MS[48]#63822L, MS[49]#63823L, MS[50]#63824L, MS[51]#63825L, sum#63987L, sum#63988, sum#63989, count#63990L]
Results [59]: [segment#63759, processing_day#63761, count#63991L, MS[0]#63826L, MS[1]#63827L, MS[2]#63828L, MS[3]#63829L, MS[4]#63830L, MS[5]#63831L, MS[6]#63832L, MS[7]#63833L, MS[8]#63834L, MS[9]#63835L, MS[10]#63836L, MS[11]#63837L, MS[12]#63838L, MS[13]#63839L, MS[14]#63840L, MS[15]#63841L, MS[16]#63842L, MS[17]#63843L, MS[18]#63844L, MS[19]#63845L, MS[20]#63846L, MS[21]#63847L, MS[22]#63848L, MS[23]#63849L, MS[24]#63850L, MS[25]#63851L, MS[26]#63852L, MS[27]#63853L, MS[28]#63854L, MS[29]#63855L, MS[30]#63856L, MS[31]#63857L, MS[32]#63858L, MS[33]#63859L, MS[34]#63860L, MS[35]#63861L, MS[36]#63862L, MS[37]#63863L, MS[38]#63864L, MS[39]#63865L, MS[40]#63866L, MS[41]#63867L, MS[42]#63868L, MS[43]#63869L, MS[44]#63870L, MS[45]#63871L, MS[46]#63872L, MS[47]#63873L, MS[48]#63874L, MS[49]#63875L, MS[50]#63876L, MS[51]#63877L, sum#63992L, sum#63993, sum#63994, count#63995L]
(15) Exchange
Input [59]: [segment#63759, processing_day#63761, count#63991L, MS[0]#63826L, MS[1]#63827L, MS[2]#63828L, MS[3]#63829L, MS[4]#63830L, MS[5]#63831L, MS[6]#63832L, MS[7]#63833L, MS[8]#63834L, MS[9]#63835L, MS[10]#63836L, MS[11]#63837L, MS[12]#63838L, MS[13]#63839L, MS[14]#63840L, MS[15]#63841L, MS[16]#63842L, MS[17]#63843L, MS[18]#63844L, MS[19]#63845L, MS[20]#63846L, MS[21]#63847L, MS[22]#63848L, MS[23]#63849L, MS[24]#63850L, MS[25]#63851L, MS[26]#63852L, MS[27]#63853L, MS[28]#63854L, MS[29]#63855L, MS[30]#63856L, MS[31]#63857L, MS[32]#63858L, MS[33]#63859L, MS[34]#63860L, MS[35]#63861L, MS[36]#63862L, MS[37]#63863L, MS[38]#63864L, MS[39]#63865L, MS[40]#63866L, MS[41]#63867L, MS[42]#63868L, MS[43]#63869L, MS[44]#63870L, MS[45]#63871L, MS[46]#63872L, MS[47]#63873L, MS[48]#63874L, MS[49]#63875L, MS[50]#63876L, MS[51]#63877L, sum#63992L, sum#63993, sum#63994, count#63995L]
Arguments: hashpartitioning(segment#63759, processing_day#63761, 200), ENSURE_REQUIREMENTS, [plan_id=6017]
(16) HashAggregate
Input [59]: [segment#63759, processing_day#63761, count#63991L, MS[0]#63826L, MS[1]#63827L, MS[2]#63828L, MS[3]#63829L, MS[4]#63830L, MS[5]#63831L, MS[6]#63832L, MS[7]#63833L, MS[8]#63834L, MS[9]#63835L, MS[10]#63836L, MS[11]#63837L, MS[12]#63838L, MS[13]#63839L, MS[14]#63840L, MS[15]#63841L, MS[16]#63842L, MS[17]#63843L, MS[18]#63844L, MS[19]#63845L, MS[20]#63846L, MS[21]#63847L, MS[22]#63848L, MS[23]#63849L, MS[24]#63850L, MS[25]#63851L, MS[26]#63852L, MS[27]#63853L, MS[28]#63854L, MS[29]#63855L, MS[30]#63856L, MS[31]#63857L, MS[32]#63858L, MS[33]#63859L, MS[34]#63860L, MS[35]#63861L, MS[36]#63862L, MS[37]#63863L, MS[38]#63864L, MS[39]#63865L, MS[40]#63866L, MS[41]#63867L, MS[42]#63868L, MS[43]#63869L, MS[44]#63870L, MS[45]#63871L, MS[46]#63872L, MS[47]#63873L, MS[48]#63874L, MS[49]#63875L, MS[50]#63876L, MS[51]#63877L, sum#63992L, sum#63993, sum#63994, count#63995L]
Keys [2]: [segment#63759, processing_day#63761]
Functions [5]: [count(1), approx_count_distinct(customer_id#63755L, 0.05, 0, 0), sum(events#63765), sum(weighted_amount#63767), avg(amount#63763)]
Aggregate Attributes [5]: [count(1)#63773L, approx_count_distinct(customer_id#63755L, 0.05, 0, 0)#63878L, sum(events#63765)#63879L, sum(weighted_amount#63767)#63880, avg(amount#63763)#63881]
Results [7]: [segment#63759, processing_day#63761, count(1)#63773L AS row_count#63768L, approx_count_distinct(customer_id#63755L, 0.05, 0, 0)#63878L AS unique_customers#63769L, sum(events#63765)#63879L AS event_sum#63770L, sum(weighted_amount#63767)#63880 AS weighted_amount_sum#63771, avg(amount#63763)#63881 AS avg_amount#63772]
(17) Exchange
Input [7]: [segment#63759, processing_day#63761, row_count#63768L, unique_customers#63769L, event_sum#63770L, weighted_amount_sum#63771, avg_amount#63772]
Arguments: rangepartitioning(segment#63759 ASC NULLS FIRST, processing_day#63761 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=6020]
(18) Sort
Input [7]: [segment#63759, processing_day#63761, row_count#63768L, unique_customers#63769L, event_sum#63770L, weighted_amount_sum#63771, avg_amount#63772]
Arguments: [segment#63759 ASC NULLS FIRST, processing_day#63761 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#63759, processing_day#63761, row_count#63768L, unique_customers#63769L, event_sum#63770L, weighted_amount_sum#63771, avg_amount#63772]
Arguments: isFinalPlan=true