== 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#92075L]
Arguments: Range (8000000, 9000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#92075L % 250000) AS customer_id#92077L, concat(segment-, cast(cast((id#92075L % 12) as int) as string)) AS segment#92081, cast((id#92075L % 14) as int) AS processing_day#92083, ((cast(((id#92075L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#92085, cast((((id#92075L * 29) % 7) + 1) as int) AS events#92087]
Input [1]: [id#92075L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#92077L, segment#92081, processing_day#92083, amount#92085, events#92087, (amount#92085 * cast(events#92087 as double)) AS weighted_amount#92089]
Input [5]: [customer_id#92077L, segment#92081, processing_day#92083, amount#92085, events#92087]
(4) HashAggregate
Input [6]: [customer_id#92077L, segment#92081, processing_day#92083, amount#92085, events#92087, weighted_amount#92089]
Keys [2]: [segment#92081, processing_day#92083]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#92077L, 0.05, 0, 0), partial_sum(events#92087), partial_sum(weighted_amount#92089), partial_avg(amount#92085)]
Aggregate Attributes [57]: [count#92308L, MS[0]#92096L, MS[1]#92097L, MS[2]#92098L, MS[3]#92099L, MS[4]#92100L, MS[5]#92101L, MS[6]#92102L, MS[7]#92103L, MS[8]#92104L, MS[9]#92105L, MS[10]#92106L, MS[11]#92107L, MS[12]#92108L, MS[13]#92109L, MS[14]#92110L, MS[15]#92111L, MS[16]#92112L, MS[17]#92113L, MS[18]#92114L, MS[19]#92115L, MS[20]#92116L, MS[21]#92117L, MS[22]#92118L, MS[23]#92119L, MS[24]#92120L, MS[25]#92121L, MS[26]#92122L, MS[27]#92123L, MS[28]#92124L, MS[29]#92125L, MS[30]#92126L, MS[31]#92127L, MS[32]#92128L, MS[33]#92129L, MS[34]#92130L, MS[35]#92131L, MS[36]#92132L, MS[37]#92133L, MS[38]#92134L, MS[39]#92135L, MS[40]#92136L, MS[41]#92137L, MS[42]#92138L, MS[43]#92139L, MS[44]#92140L, MS[45]#92141L, MS[46]#92142L, MS[47]#92143L, MS[48]#92144L, MS[49]#92145L, MS[50]#92146L, MS[51]#92147L, sum#92309L, sum#92310, sum#92311, count#92312L]
Results [59]: [segment#92081, processing_day#92083, count#92313L, MS[0]#92148L, MS[1]#92149L, MS[2]#92150L, MS[3]#92151L, MS[4]#92152L, MS[5]#92153L, MS[6]#92154L, MS[7]#92155L, MS[8]#92156L, MS[9]#92157L, MS[10]#92158L, MS[11]#92159L, MS[12]#92160L, MS[13]#92161L, MS[14]#92162L, MS[15]#92163L, MS[16]#92164L, MS[17]#92165L, MS[18]#92166L, MS[19]#92167L, MS[20]#92168L, MS[21]#92169L, MS[22]#92170L, MS[23]#92171L, MS[24]#92172L, MS[25]#92173L, MS[26]#92174L, MS[27]#92175L, MS[28]#92176L, MS[29]#92177L, MS[30]#92178L, MS[31]#92179L, MS[32]#92180L, MS[33]#92181L, MS[34]#92182L, MS[35]#92183L, MS[36]#92184L, MS[37]#92185L, MS[38]#92186L, MS[39]#92187L, MS[40]#92188L, MS[41]#92189L, MS[42]#92190L, MS[43]#92191L, MS[44]#92192L, MS[45]#92193L, MS[46]#92194L, MS[47]#92195L, MS[48]#92196L, MS[49]#92197L, MS[50]#92198L, MS[51]#92199L, sum#92314L, sum#92315, sum#92316, count#92317L]
(5) Exchange
Input [59]: [segment#92081, processing_day#92083, count#92313L, MS[0]#92148L, MS[1]#92149L, MS[2]#92150L, MS[3]#92151L, MS[4]#92152L, MS[5]#92153L, MS[6]#92154L, MS[7]#92155L, MS[8]#92156L, MS[9]#92157L, MS[10]#92158L, MS[11]#92159L, MS[12]#92160L, MS[13]#92161L, MS[14]#92162L, MS[15]#92163L, MS[16]#92164L, MS[17]#92165L, MS[18]#92166L, MS[19]#92167L, MS[20]#92168L, MS[21]#92169L, MS[22]#92170L, MS[23]#92171L, MS[24]#92172L, MS[25]#92173L, MS[26]#92174L, MS[27]#92175L, MS[28]#92176L, MS[29]#92177L, MS[30]#92178L, MS[31]#92179L, MS[32]#92180L, MS[33]#92181L, MS[34]#92182L, MS[35]#92183L, MS[36]#92184L, MS[37]#92185L, MS[38]#92186L, MS[39]#92187L, MS[40]#92188L, MS[41]#92189L, MS[42]#92190L, MS[43]#92191L, MS[44]#92192L, MS[45]#92193L, MS[46]#92194L, MS[47]#92195L, MS[48]#92196L, MS[49]#92197L, MS[50]#92198L, MS[51]#92199L, sum#92314L, sum#92315, sum#92316, count#92317L]
Arguments: hashpartitioning(segment#92081, processing_day#92083, 200), ENSURE_REQUIREMENTS, [plan_id=8699]
(6) ShuffleQueryStage
Output [59]: [segment#92081, processing_day#92083, count#92313L, MS[0]#92148L, MS[1]#92149L, MS[2]#92150L, MS[3]#92151L, MS[4]#92152L, MS[5]#92153L, MS[6]#92154L, MS[7]#92155L, MS[8]#92156L, MS[9]#92157L, MS[10]#92158L, MS[11]#92159L, MS[12]#92160L, MS[13]#92161L, MS[14]#92162L, MS[15]#92163L, MS[16]#92164L, MS[17]#92165L, MS[18]#92166L, MS[19]#92167L, MS[20]#92168L, MS[21]#92169L, MS[22]#92170L, MS[23]#92171L, MS[24]#92172L, MS[25]#92173L, MS[26]#92174L, MS[27]#92175L, MS[28]#92176L, MS[29]#92177L, MS[30]#92178L, MS[31]#92179L, MS[32]#92180L, MS[33]#92181L, MS[34]#92182L, MS[35]#92183L, MS[36]#92184L, MS[37]#92185L, MS[38]#92186L, MS[39]#92187L, MS[40]#92188L, MS[41]#92189L, MS[42]#92190L, MS[43]#92191L, MS[44]#92192L, MS[45]#92193L, MS[46]#92194L, MS[47]#92195L, MS[48]#92196L, MS[49]#92197L, MS[50]#92198L, MS[51]#92199L, sum#92314L, sum#92315, sum#92316, count#92317L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#92081, processing_day#92083, count#92313L, MS[0]#92148L, MS[1]#92149L, MS[2]#92150L, MS[3]#92151L, MS[4]#92152L, MS[5]#92153L, MS[6]#92154L, MS[7]#92155L, MS[8]#92156L, MS[9]#92157L, MS[10]#92158L, MS[11]#92159L, MS[12]#92160L, MS[13]#92161L, MS[14]#92162L, MS[15]#92163L, MS[16]#92164L, MS[17]#92165L, MS[18]#92166L, MS[19]#92167L, MS[20]#92168L, MS[21]#92169L, MS[22]#92170L, MS[23]#92171L, MS[24]#92172L, MS[25]#92173L, MS[26]#92174L, MS[27]#92175L, MS[28]#92176L, MS[29]#92177L, MS[30]#92178L, MS[31]#92179L, MS[32]#92180L, MS[33]#92181L, MS[34]#92182L, MS[35]#92183L, MS[36]#92184L, MS[37]#92185L, MS[38]#92186L, MS[39]#92187L, MS[40]#92188L, MS[41]#92189L, MS[42]#92190L, MS[43]#92191L, MS[44]#92192L, MS[45]#92193L, MS[46]#92194L, MS[47]#92195L, MS[48]#92196L, MS[49]#92197L, MS[50]#92198L, MS[51]#92199L, sum#92314L, sum#92315, sum#92316, count#92317L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#92081, processing_day#92083, count#92313L, MS[0]#92148L, MS[1]#92149L, MS[2]#92150L, MS[3]#92151L, MS[4]#92152L, MS[5]#92153L, MS[6]#92154L, MS[7]#92155L, MS[8]#92156L, MS[9]#92157L, MS[10]#92158L, MS[11]#92159L, MS[12]#92160L, MS[13]#92161L, MS[14]#92162L, MS[15]#92163L, MS[16]#92164L, MS[17]#92165L, MS[18]#92166L, MS[19]#92167L, MS[20]#92168L, MS[21]#92169L, MS[22]#92170L, MS[23]#92171L, MS[24]#92172L, MS[25]#92173L, MS[26]#92174L, MS[27]#92175L, MS[28]#92176L, MS[29]#92177L, MS[30]#92178L, MS[31]#92179L, MS[32]#92180L, MS[33]#92181L, MS[34]#92182L, MS[35]#92183L, MS[36]#92184L, MS[37]#92185L, MS[38]#92186L, MS[39]#92187L, MS[40]#92188L, MS[41]#92189L, MS[42]#92190L, MS[43]#92191L, MS[44]#92192L, MS[45]#92193L, MS[46]#92194L, MS[47]#92195L, MS[48]#92196L, MS[49]#92197L, MS[50]#92198L, MS[51]#92199L, sum#92314L, sum#92315, sum#92316, count#92317L]
Keys [2]: [segment#92081, processing_day#92083]
Functions [5]: [count(1), approx_count_distinct(customer_id#92077L, 0.05, 0, 0), sum(events#92087), sum(weighted_amount#92089), avg(amount#92085)]
Aggregate Attributes [5]: [count(1)#92095L, approx_count_distinct(customer_id#92077L, 0.05, 0, 0)#92200L, sum(events#92087)#92201L, sum(weighted_amount#92089)#92202, avg(amount#92085)#92203]
Results [7]: [segment#92081, processing_day#92083, count(1)#92095L AS row_count#92090L, approx_count_distinct(customer_id#92077L, 0.05, 0, 0)#92200L AS unique_customers#92091L, sum(events#92087)#92201L AS event_sum#92092L, sum(weighted_amount#92089)#92202 AS weighted_amount_sum#92093, avg(amount#92085)#92203 AS avg_amount#92094]
(9) Exchange
Input [7]: [segment#92081, processing_day#92083, row_count#92090L, unique_customers#92091L, event_sum#92092L, weighted_amount_sum#92093, avg_amount#92094]
Arguments: rangepartitioning(segment#92081 ASC NULLS FIRST, processing_day#92083 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=8721]
(10) ShuffleQueryStage
Output [7]: [segment#92081, processing_day#92083, row_count#92090L, unique_customers#92091L, event_sum#92092L, weighted_amount_sum#92093, avg_amount#92094]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#92081, processing_day#92083, row_count#92090L, unique_customers#92091L, event_sum#92092L, weighted_amount_sum#92093, avg_amount#92094]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#92081, processing_day#92083, row_count#92090L, unique_customers#92091L, event_sum#92092L, weighted_amount_sum#92093, avg_amount#92094]
Arguments: [segment#92081 ASC NULLS FIRST, processing_day#92083 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#92081, processing_day#92083, row_count#92090L, unique_customers#92091L, event_sum#92092L, weighted_amount_sum#92093, avg_amount#92094]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#92077L, segment#92081, processing_day#92083, amount#92085, events#92087, weighted_amount#92089]
Keys [2]: [segment#92081, processing_day#92083]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#92077L, 0.05, 0, 0), partial_sum(events#92087), partial_sum(weighted_amount#92089), partial_avg(amount#92085)]
Aggregate Attributes [57]: [count#92308L, MS[0]#92096L, MS[1]#92097L, MS[2]#92098L, MS[3]#92099L, MS[4]#92100L, MS[5]#92101L, MS[6]#92102L, MS[7]#92103L, MS[8]#92104L, MS[9]#92105L, MS[10]#92106L, MS[11]#92107L, MS[12]#92108L, MS[13]#92109L, MS[14]#92110L, MS[15]#92111L, MS[16]#92112L, MS[17]#92113L, MS[18]#92114L, MS[19]#92115L, MS[20]#92116L, MS[21]#92117L, MS[22]#92118L, MS[23]#92119L, MS[24]#92120L, MS[25]#92121L, MS[26]#92122L, MS[27]#92123L, MS[28]#92124L, MS[29]#92125L, MS[30]#92126L, MS[31]#92127L, MS[32]#92128L, MS[33]#92129L, MS[34]#92130L, MS[35]#92131L, MS[36]#92132L, MS[37]#92133L, MS[38]#92134L, MS[39]#92135L, MS[40]#92136L, MS[41]#92137L, MS[42]#92138L, MS[43]#92139L, MS[44]#92140L, MS[45]#92141L, MS[46]#92142L, MS[47]#92143L, MS[48]#92144L, MS[49]#92145L, MS[50]#92146L, MS[51]#92147L, sum#92309L, sum#92310, sum#92311, count#92312L]
Results [59]: [segment#92081, processing_day#92083, count#92313L, MS[0]#92148L, MS[1]#92149L, MS[2]#92150L, MS[3]#92151L, MS[4]#92152L, MS[5]#92153L, MS[6]#92154L, MS[7]#92155L, MS[8]#92156L, MS[9]#92157L, MS[10]#92158L, MS[11]#92159L, MS[12]#92160L, MS[13]#92161L, MS[14]#92162L, MS[15]#92163L, MS[16]#92164L, MS[17]#92165L, MS[18]#92166L, MS[19]#92167L, MS[20]#92168L, MS[21]#92169L, MS[22]#92170L, MS[23]#92171L, MS[24]#92172L, MS[25]#92173L, MS[26]#92174L, MS[27]#92175L, MS[28]#92176L, MS[29]#92177L, MS[30]#92178L, MS[31]#92179L, MS[32]#92180L, MS[33]#92181L, MS[34]#92182L, MS[35]#92183L, MS[36]#92184L, MS[37]#92185L, MS[38]#92186L, MS[39]#92187L, MS[40]#92188L, MS[41]#92189L, MS[42]#92190L, MS[43]#92191L, MS[44]#92192L, MS[45]#92193L, MS[46]#92194L, MS[47]#92195L, MS[48]#92196L, MS[49]#92197L, MS[50]#92198L, MS[51]#92199L, sum#92314L, sum#92315, sum#92316, count#92317L]
(15) Exchange
Input [59]: [segment#92081, processing_day#92083, count#92313L, MS[0]#92148L, MS[1]#92149L, MS[2]#92150L, MS[3]#92151L, MS[4]#92152L, MS[5]#92153L, MS[6]#92154L, MS[7]#92155L, MS[8]#92156L, MS[9]#92157L, MS[10]#92158L, MS[11]#92159L, MS[12]#92160L, MS[13]#92161L, MS[14]#92162L, MS[15]#92163L, MS[16]#92164L, MS[17]#92165L, MS[18]#92166L, MS[19]#92167L, MS[20]#92168L, MS[21]#92169L, MS[22]#92170L, MS[23]#92171L, MS[24]#92172L, MS[25]#92173L, MS[26]#92174L, MS[27]#92175L, MS[28]#92176L, MS[29]#92177L, MS[30]#92178L, MS[31]#92179L, MS[32]#92180L, MS[33]#92181L, MS[34]#92182L, MS[35]#92183L, MS[36]#92184L, MS[37]#92185L, MS[38]#92186L, MS[39]#92187L, MS[40]#92188L, MS[41]#92189L, MS[42]#92190L, MS[43]#92191L, MS[44]#92192L, MS[45]#92193L, MS[46]#92194L, MS[47]#92195L, MS[48]#92196L, MS[49]#92197L, MS[50]#92198L, MS[51]#92199L, sum#92314L, sum#92315, sum#92316, count#92317L]
Arguments: hashpartitioning(segment#92081, processing_day#92083, 200), ENSURE_REQUIREMENTS, [plan_id=8679]
(16) HashAggregate
Input [59]: [segment#92081, processing_day#92083, count#92313L, MS[0]#92148L, MS[1]#92149L, MS[2]#92150L, MS[3]#92151L, MS[4]#92152L, MS[5]#92153L, MS[6]#92154L, MS[7]#92155L, MS[8]#92156L, MS[9]#92157L, MS[10]#92158L, MS[11]#92159L, MS[12]#92160L, MS[13]#92161L, MS[14]#92162L, MS[15]#92163L, MS[16]#92164L, MS[17]#92165L, MS[18]#92166L, MS[19]#92167L, MS[20]#92168L, MS[21]#92169L, MS[22]#92170L, MS[23]#92171L, MS[24]#92172L, MS[25]#92173L, MS[26]#92174L, MS[27]#92175L, MS[28]#92176L, MS[29]#92177L, MS[30]#92178L, MS[31]#92179L, MS[32]#92180L, MS[33]#92181L, MS[34]#92182L, MS[35]#92183L, MS[36]#92184L, MS[37]#92185L, MS[38]#92186L, MS[39]#92187L, MS[40]#92188L, MS[41]#92189L, MS[42]#92190L, MS[43]#92191L, MS[44]#92192L, MS[45]#92193L, MS[46]#92194L, MS[47]#92195L, MS[48]#92196L, MS[49]#92197L, MS[50]#92198L, MS[51]#92199L, sum#92314L, sum#92315, sum#92316, count#92317L]
Keys [2]: [segment#92081, processing_day#92083]
Functions [5]: [count(1), approx_count_distinct(customer_id#92077L, 0.05, 0, 0), sum(events#92087), sum(weighted_amount#92089), avg(amount#92085)]
Aggregate Attributes [5]: [count(1)#92095L, approx_count_distinct(customer_id#92077L, 0.05, 0, 0)#92200L, sum(events#92087)#92201L, sum(weighted_amount#92089)#92202, avg(amount#92085)#92203]
Results [7]: [segment#92081, processing_day#92083, count(1)#92095L AS row_count#92090L, approx_count_distinct(customer_id#92077L, 0.05, 0, 0)#92200L AS unique_customers#92091L, sum(events#92087)#92201L AS event_sum#92092L, sum(weighted_amount#92089)#92202 AS weighted_amount_sum#92093, avg(amount#92085)#92203 AS avg_amount#92094]
(17) Exchange
Input [7]: [segment#92081, processing_day#92083, row_count#92090L, unique_customers#92091L, event_sum#92092L, weighted_amount_sum#92093, avg_amount#92094]
Arguments: rangepartitioning(segment#92081 ASC NULLS FIRST, processing_day#92083 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=8682]
(18) Sort
Input [7]: [segment#92081, processing_day#92083, row_count#92090L, unique_customers#92091L, event_sum#92092L, weighted_amount_sum#92093, avg_amount#92094]
Arguments: [segment#92081 ASC NULLS FIRST, processing_day#92083 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#92081, processing_day#92083, row_count#92090L, unique_customers#92091L, event_sum#92092L, weighted_amount_sum#92093, avg_amount#92094]
Arguments: isFinalPlan=true