== 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#69057L]
Arguments: Range (6000000, 7000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#69057L % 250000) AS customer_id#69059L, concat(segment-, cast(cast((id#69057L % 12) as int) as string)) AS segment#69063, cast((id#69057L % 14) as int) AS processing_day#69065, ((cast(((id#69057L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#69067, cast((((id#69057L * 29) % 7) + 1) as int) AS events#69069]
Input [1]: [id#69057L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#69059L, segment#69063, processing_day#69065, amount#69067, events#69069, (amount#69067 * cast(events#69069 as double)) AS weighted_amount#69071]
Input [5]: [customer_id#69059L, segment#69063, processing_day#69065, amount#69067, events#69069]
(4) HashAggregate
Input [6]: [customer_id#69059L, segment#69063, processing_day#69065, amount#69067, events#69069, weighted_amount#69071]
Keys [2]: [segment#69063, processing_day#69065]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#69059L, 0.05, 0, 0), partial_sum(events#69069), partial_sum(weighted_amount#69071), partial_avg(amount#69067)]
Aggregate Attributes [57]: [count#69290L, MS[0]#69078L, MS[1]#69079L, MS[2]#69080L, MS[3]#69081L, MS[4]#69082L, MS[5]#69083L, MS[6]#69084L, MS[7]#69085L, MS[8]#69086L, MS[9]#69087L, MS[10]#69088L, MS[11]#69089L, MS[12]#69090L, MS[13]#69091L, MS[14]#69092L, MS[15]#69093L, MS[16]#69094L, MS[17]#69095L, MS[18]#69096L, MS[19]#69097L, MS[20]#69098L, MS[21]#69099L, MS[22]#69100L, MS[23]#69101L, MS[24]#69102L, MS[25]#69103L, MS[26]#69104L, MS[27]#69105L, MS[28]#69106L, MS[29]#69107L, MS[30]#69108L, MS[31]#69109L, MS[32]#69110L, MS[33]#69111L, MS[34]#69112L, MS[35]#69113L, MS[36]#69114L, MS[37]#69115L, MS[38]#69116L, MS[39]#69117L, MS[40]#69118L, MS[41]#69119L, MS[42]#69120L, MS[43]#69121L, MS[44]#69122L, MS[45]#69123L, MS[46]#69124L, MS[47]#69125L, MS[48]#69126L, MS[49]#69127L, MS[50]#69128L, MS[51]#69129L, sum#69291L, sum#69292, sum#69293, count#69294L]
Results [59]: [segment#69063, processing_day#69065, count#69295L, MS[0]#69130L, MS[1]#69131L, MS[2]#69132L, MS[3]#69133L, MS[4]#69134L, MS[5]#69135L, MS[6]#69136L, MS[7]#69137L, MS[8]#69138L, MS[9]#69139L, MS[10]#69140L, MS[11]#69141L, MS[12]#69142L, MS[13]#69143L, MS[14]#69144L, MS[15]#69145L, MS[16]#69146L, MS[17]#69147L, MS[18]#69148L, MS[19]#69149L, MS[20]#69150L, MS[21]#69151L, MS[22]#69152L, MS[23]#69153L, MS[24]#69154L, MS[25]#69155L, MS[26]#69156L, MS[27]#69157L, MS[28]#69158L, MS[29]#69159L, MS[30]#69160L, MS[31]#69161L, MS[32]#69162L, MS[33]#69163L, MS[34]#69164L, MS[35]#69165L, MS[36]#69166L, MS[37]#69167L, MS[38]#69168L, MS[39]#69169L, MS[40]#69170L, MS[41]#69171L, MS[42]#69172L, MS[43]#69173L, MS[44]#69174L, MS[45]#69175L, MS[46]#69176L, MS[47]#69177L, MS[48]#69178L, MS[49]#69179L, MS[50]#69180L, MS[51]#69181L, sum#69296L, sum#69297, sum#69298, count#69299L]
(5) Exchange
Input [59]: [segment#69063, processing_day#69065, count#69295L, MS[0]#69130L, MS[1]#69131L, MS[2]#69132L, MS[3]#69133L, MS[4]#69134L, MS[5]#69135L, MS[6]#69136L, MS[7]#69137L, MS[8]#69138L, MS[9]#69139L, MS[10]#69140L, MS[11]#69141L, MS[12]#69142L, MS[13]#69143L, MS[14]#69144L, MS[15]#69145L, MS[16]#69146L, MS[17]#69147L, MS[18]#69148L, MS[19]#69149L, MS[20]#69150L, MS[21]#69151L, MS[22]#69152L, MS[23]#69153L, MS[24]#69154L, MS[25]#69155L, MS[26]#69156L, MS[27]#69157L, MS[28]#69158L, MS[29]#69159L, MS[30]#69160L, MS[31]#69161L, MS[32]#69162L, MS[33]#69163L, MS[34]#69164L, MS[35]#69165L, MS[36]#69166L, MS[37]#69167L, MS[38]#69168L, MS[39]#69169L, MS[40]#69170L, MS[41]#69171L, MS[42]#69172L, MS[43]#69173L, MS[44]#69174L, MS[45]#69175L, MS[46]#69176L, MS[47]#69177L, MS[48]#69178L, MS[49]#69179L, MS[50]#69180L, MS[51]#69181L, sum#69296L, sum#69297, sum#69298, count#69299L]
Arguments: hashpartitioning(segment#69063, processing_day#69065, 200), ENSURE_REQUIREMENTS, [plan_id=6535]
(6) ShuffleQueryStage
Output [59]: [segment#69063, processing_day#69065, count#69295L, MS[0]#69130L, MS[1]#69131L, MS[2]#69132L, MS[3]#69133L, MS[4]#69134L, MS[5]#69135L, MS[6]#69136L, MS[7]#69137L, MS[8]#69138L, MS[9]#69139L, MS[10]#69140L, MS[11]#69141L, MS[12]#69142L, MS[13]#69143L, MS[14]#69144L, MS[15]#69145L, MS[16]#69146L, MS[17]#69147L, MS[18]#69148L, MS[19]#69149L, MS[20]#69150L, MS[21]#69151L, MS[22]#69152L, MS[23]#69153L, MS[24]#69154L, MS[25]#69155L, MS[26]#69156L, MS[27]#69157L, MS[28]#69158L, MS[29]#69159L, MS[30]#69160L, MS[31]#69161L, MS[32]#69162L, MS[33]#69163L, MS[34]#69164L, MS[35]#69165L, MS[36]#69166L, MS[37]#69167L, MS[38]#69168L, MS[39]#69169L, MS[40]#69170L, MS[41]#69171L, MS[42]#69172L, MS[43]#69173L, MS[44]#69174L, MS[45]#69175L, MS[46]#69176L, MS[47]#69177L, MS[48]#69178L, MS[49]#69179L, MS[50]#69180L, MS[51]#69181L, sum#69296L, sum#69297, sum#69298, count#69299L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#69063, processing_day#69065, count#69295L, MS[0]#69130L, MS[1]#69131L, MS[2]#69132L, MS[3]#69133L, MS[4]#69134L, MS[5]#69135L, MS[6]#69136L, MS[7]#69137L, MS[8]#69138L, MS[9]#69139L, MS[10]#69140L, MS[11]#69141L, MS[12]#69142L, MS[13]#69143L, MS[14]#69144L, MS[15]#69145L, MS[16]#69146L, MS[17]#69147L, MS[18]#69148L, MS[19]#69149L, MS[20]#69150L, MS[21]#69151L, MS[22]#69152L, MS[23]#69153L, MS[24]#69154L, MS[25]#69155L, MS[26]#69156L, MS[27]#69157L, MS[28]#69158L, MS[29]#69159L, MS[30]#69160L, MS[31]#69161L, MS[32]#69162L, MS[33]#69163L, MS[34]#69164L, MS[35]#69165L, MS[36]#69166L, MS[37]#69167L, MS[38]#69168L, MS[39]#69169L, MS[40]#69170L, MS[41]#69171L, MS[42]#69172L, MS[43]#69173L, MS[44]#69174L, MS[45]#69175L, MS[46]#69176L, MS[47]#69177L, MS[48]#69178L, MS[49]#69179L, MS[50]#69180L, MS[51]#69181L, sum#69296L, sum#69297, sum#69298, count#69299L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#69063, processing_day#69065, count#69295L, MS[0]#69130L, MS[1]#69131L, MS[2]#69132L, MS[3]#69133L, MS[4]#69134L, MS[5]#69135L, MS[6]#69136L, MS[7]#69137L, MS[8]#69138L, MS[9]#69139L, MS[10]#69140L, MS[11]#69141L, MS[12]#69142L, MS[13]#69143L, MS[14]#69144L, MS[15]#69145L, MS[16]#69146L, MS[17]#69147L, MS[18]#69148L, MS[19]#69149L, MS[20]#69150L, MS[21]#69151L, MS[22]#69152L, MS[23]#69153L, MS[24]#69154L, MS[25]#69155L, MS[26]#69156L, MS[27]#69157L, MS[28]#69158L, MS[29]#69159L, MS[30]#69160L, MS[31]#69161L, MS[32]#69162L, MS[33]#69163L, MS[34]#69164L, MS[35]#69165L, MS[36]#69166L, MS[37]#69167L, MS[38]#69168L, MS[39]#69169L, MS[40]#69170L, MS[41]#69171L, MS[42]#69172L, MS[43]#69173L, MS[44]#69174L, MS[45]#69175L, MS[46]#69176L, MS[47]#69177L, MS[48]#69178L, MS[49]#69179L, MS[50]#69180L, MS[51]#69181L, sum#69296L, sum#69297, sum#69298, count#69299L]
Keys [2]: [segment#69063, processing_day#69065]
Functions [5]: [count(1), approx_count_distinct(customer_id#69059L, 0.05, 0, 0), sum(events#69069), sum(weighted_amount#69071), avg(amount#69067)]
Aggregate Attributes [5]: [count(1)#69077L, approx_count_distinct(customer_id#69059L, 0.05, 0, 0)#69182L, sum(events#69069)#69183L, sum(weighted_amount#69071)#69184, avg(amount#69067)#69185]
Results [7]: [segment#69063, processing_day#69065, count(1)#69077L AS row_count#69072L, approx_count_distinct(customer_id#69059L, 0.05, 0, 0)#69182L AS unique_customers#69073L, sum(events#69069)#69183L AS event_sum#69074L, sum(weighted_amount#69071)#69184 AS weighted_amount_sum#69075, avg(amount#69067)#69185 AS avg_amount#69076]
(9) Exchange
Input [7]: [segment#69063, processing_day#69065, row_count#69072L, unique_customers#69073L, event_sum#69074L, weighted_amount_sum#69075, avg_amount#69076]
Arguments: rangepartitioning(segment#69063 ASC NULLS FIRST, processing_day#69065 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=6557]
(10) ShuffleQueryStage
Output [7]: [segment#69063, processing_day#69065, row_count#69072L, unique_customers#69073L, event_sum#69074L, weighted_amount_sum#69075, avg_amount#69076]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#69063, processing_day#69065, row_count#69072L, unique_customers#69073L, event_sum#69074L, weighted_amount_sum#69075, avg_amount#69076]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#69063, processing_day#69065, row_count#69072L, unique_customers#69073L, event_sum#69074L, weighted_amount_sum#69075, avg_amount#69076]
Arguments: [segment#69063 ASC NULLS FIRST, processing_day#69065 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#69063, processing_day#69065, row_count#69072L, unique_customers#69073L, event_sum#69074L, weighted_amount_sum#69075, avg_amount#69076]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#69059L, segment#69063, processing_day#69065, amount#69067, events#69069, weighted_amount#69071]
Keys [2]: [segment#69063, processing_day#69065]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#69059L, 0.05, 0, 0), partial_sum(events#69069), partial_sum(weighted_amount#69071), partial_avg(amount#69067)]
Aggregate Attributes [57]: [count#69290L, MS[0]#69078L, MS[1]#69079L, MS[2]#69080L, MS[3]#69081L, MS[4]#69082L, MS[5]#69083L, MS[6]#69084L, MS[7]#69085L, MS[8]#69086L, MS[9]#69087L, MS[10]#69088L, MS[11]#69089L, MS[12]#69090L, MS[13]#69091L, MS[14]#69092L, MS[15]#69093L, MS[16]#69094L, MS[17]#69095L, MS[18]#69096L, MS[19]#69097L, MS[20]#69098L, MS[21]#69099L, MS[22]#69100L, MS[23]#69101L, MS[24]#69102L, MS[25]#69103L, MS[26]#69104L, MS[27]#69105L, MS[28]#69106L, MS[29]#69107L, MS[30]#69108L, MS[31]#69109L, MS[32]#69110L, MS[33]#69111L, MS[34]#69112L, MS[35]#69113L, MS[36]#69114L, MS[37]#69115L, MS[38]#69116L, MS[39]#69117L, MS[40]#69118L, MS[41]#69119L, MS[42]#69120L, MS[43]#69121L, MS[44]#69122L, MS[45]#69123L, MS[46]#69124L, MS[47]#69125L, MS[48]#69126L, MS[49]#69127L, MS[50]#69128L, MS[51]#69129L, sum#69291L, sum#69292, sum#69293, count#69294L]
Results [59]: [segment#69063, processing_day#69065, count#69295L, MS[0]#69130L, MS[1]#69131L, MS[2]#69132L, MS[3]#69133L, MS[4]#69134L, MS[5]#69135L, MS[6]#69136L, MS[7]#69137L, MS[8]#69138L, MS[9]#69139L, MS[10]#69140L, MS[11]#69141L, MS[12]#69142L, MS[13]#69143L, MS[14]#69144L, MS[15]#69145L, MS[16]#69146L, MS[17]#69147L, MS[18]#69148L, MS[19]#69149L, MS[20]#69150L, MS[21]#69151L, MS[22]#69152L, MS[23]#69153L, MS[24]#69154L, MS[25]#69155L, MS[26]#69156L, MS[27]#69157L, MS[28]#69158L, MS[29]#69159L, MS[30]#69160L, MS[31]#69161L, MS[32]#69162L, MS[33]#69163L, MS[34]#69164L, MS[35]#69165L, MS[36]#69166L, MS[37]#69167L, MS[38]#69168L, MS[39]#69169L, MS[40]#69170L, MS[41]#69171L, MS[42]#69172L, MS[43]#69173L, MS[44]#69174L, MS[45]#69175L, MS[46]#69176L, MS[47]#69177L, MS[48]#69178L, MS[49]#69179L, MS[50]#69180L, MS[51]#69181L, sum#69296L, sum#69297, sum#69298, count#69299L]
(15) Exchange
Input [59]: [segment#69063, processing_day#69065, count#69295L, MS[0]#69130L, MS[1]#69131L, MS[2]#69132L, MS[3]#69133L, MS[4]#69134L, MS[5]#69135L, MS[6]#69136L, MS[7]#69137L, MS[8]#69138L, MS[9]#69139L, MS[10]#69140L, MS[11]#69141L, MS[12]#69142L, MS[13]#69143L, MS[14]#69144L, MS[15]#69145L, MS[16]#69146L, MS[17]#69147L, MS[18]#69148L, MS[19]#69149L, MS[20]#69150L, MS[21]#69151L, MS[22]#69152L, MS[23]#69153L, MS[24]#69154L, MS[25]#69155L, MS[26]#69156L, MS[27]#69157L, MS[28]#69158L, MS[29]#69159L, MS[30]#69160L, MS[31]#69161L, MS[32]#69162L, MS[33]#69163L, MS[34]#69164L, MS[35]#69165L, MS[36]#69166L, MS[37]#69167L, MS[38]#69168L, MS[39]#69169L, MS[40]#69170L, MS[41]#69171L, MS[42]#69172L, MS[43]#69173L, MS[44]#69174L, MS[45]#69175L, MS[46]#69176L, MS[47]#69177L, MS[48]#69178L, MS[49]#69179L, MS[50]#69180L, MS[51]#69181L, sum#69296L, sum#69297, sum#69298, count#69299L]
Arguments: hashpartitioning(segment#69063, processing_day#69065, 200), ENSURE_REQUIREMENTS, [plan_id=6515]
(16) HashAggregate
Input [59]: [segment#69063, processing_day#69065, count#69295L, MS[0]#69130L, MS[1]#69131L, MS[2]#69132L, MS[3]#69133L, MS[4]#69134L, MS[5]#69135L, MS[6]#69136L, MS[7]#69137L, MS[8]#69138L, MS[9]#69139L, MS[10]#69140L, MS[11]#69141L, MS[12]#69142L, MS[13]#69143L, MS[14]#69144L, MS[15]#69145L, MS[16]#69146L, MS[17]#69147L, MS[18]#69148L, MS[19]#69149L, MS[20]#69150L, MS[21]#69151L, MS[22]#69152L, MS[23]#69153L, MS[24]#69154L, MS[25]#69155L, MS[26]#69156L, MS[27]#69157L, MS[28]#69158L, MS[29]#69159L, MS[30]#69160L, MS[31]#69161L, MS[32]#69162L, MS[33]#69163L, MS[34]#69164L, MS[35]#69165L, MS[36]#69166L, MS[37]#69167L, MS[38]#69168L, MS[39]#69169L, MS[40]#69170L, MS[41]#69171L, MS[42]#69172L, MS[43]#69173L, MS[44]#69174L, MS[45]#69175L, MS[46]#69176L, MS[47]#69177L, MS[48]#69178L, MS[49]#69179L, MS[50]#69180L, MS[51]#69181L, sum#69296L, sum#69297, sum#69298, count#69299L]
Keys [2]: [segment#69063, processing_day#69065]
Functions [5]: [count(1), approx_count_distinct(customer_id#69059L, 0.05, 0, 0), sum(events#69069), sum(weighted_amount#69071), avg(amount#69067)]
Aggregate Attributes [5]: [count(1)#69077L, approx_count_distinct(customer_id#69059L, 0.05, 0, 0)#69182L, sum(events#69069)#69183L, sum(weighted_amount#69071)#69184, avg(amount#69067)#69185]
Results [7]: [segment#69063, processing_day#69065, count(1)#69077L AS row_count#69072L, approx_count_distinct(customer_id#69059L, 0.05, 0, 0)#69182L AS unique_customers#69073L, sum(events#69069)#69183L AS event_sum#69074L, sum(weighted_amount#69071)#69184 AS weighted_amount_sum#69075, avg(amount#69067)#69185 AS avg_amount#69076]
(17) Exchange
Input [7]: [segment#69063, processing_day#69065, row_count#69072L, unique_customers#69073L, event_sum#69074L, weighted_amount_sum#69075, avg_amount#69076]
Arguments: rangepartitioning(segment#69063 ASC NULLS FIRST, processing_day#69065 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=6518]
(18) Sort
Input [7]: [segment#69063, processing_day#69065, row_count#69072L, unique_customers#69073L, event_sum#69074L, weighted_amount_sum#69075, avg_amount#69076]
Arguments: [segment#69063 ASC NULLS FIRST, processing_day#69065 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#69063, processing_day#69065, row_count#69072L, unique_customers#69073L, event_sum#69074L, weighted_amount_sum#69075, avg_amount#69076]
Arguments: isFinalPlan=true