== 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#78781L]
Arguments: Range (17000000, 18000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#78781L % 250000) AS customer_id#78783L, concat(segment-, cast(cast((id#78781L % 12) as int) as string)) AS segment#78787, cast((id#78781L % 14) as int) AS processing_day#78789, ((cast(((id#78781L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#78791, cast((((id#78781L * 29) % 7) + 1) as int) AS events#78793]
Input [1]: [id#78781L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#78783L, segment#78787, processing_day#78789, amount#78791, events#78793, (amount#78791 * cast(events#78793 as double)) AS weighted_amount#78795]
Input [5]: [customer_id#78783L, segment#78787, processing_day#78789, amount#78791, events#78793]
(4) HashAggregate
Input [6]: [customer_id#78783L, segment#78787, processing_day#78789, amount#78791, events#78793, weighted_amount#78795]
Keys [2]: [segment#78787, processing_day#78789]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#78783L, 0.05, 0, 0), partial_sum(events#78793), partial_sum(weighted_amount#78795), partial_avg(amount#78791)]
Aggregate Attributes [57]: [count#79014L, MS[0]#78802L, MS[1]#78803L, MS[2]#78804L, MS[3]#78805L, MS[4]#78806L, MS[5]#78807L, MS[6]#78808L, MS[7]#78809L, MS[8]#78810L, MS[9]#78811L, MS[10]#78812L, MS[11]#78813L, MS[12]#78814L, MS[13]#78815L, MS[14]#78816L, MS[15]#78817L, MS[16]#78818L, MS[17]#78819L, MS[18]#78820L, MS[19]#78821L, MS[20]#78822L, MS[21]#78823L, MS[22]#78824L, MS[23]#78825L, MS[24]#78826L, MS[25]#78827L, MS[26]#78828L, MS[27]#78829L, MS[28]#78830L, MS[29]#78831L, MS[30]#78832L, MS[31]#78833L, MS[32]#78834L, MS[33]#78835L, MS[34]#78836L, MS[35]#78837L, MS[36]#78838L, MS[37]#78839L, MS[38]#78840L, MS[39]#78841L, MS[40]#78842L, MS[41]#78843L, MS[42]#78844L, MS[43]#78845L, MS[44]#78846L, MS[45]#78847L, MS[46]#78848L, MS[47]#78849L, MS[48]#78850L, MS[49]#78851L, MS[50]#78852L, MS[51]#78853L, sum#79015L, sum#79016, sum#79017, count#79018L]
Results [59]: [segment#78787, processing_day#78789, count#79019L, MS[0]#78854L, MS[1]#78855L, MS[2]#78856L, MS[3]#78857L, MS[4]#78858L, MS[5]#78859L, MS[6]#78860L, MS[7]#78861L, MS[8]#78862L, MS[9]#78863L, MS[10]#78864L, MS[11]#78865L, MS[12]#78866L, MS[13]#78867L, MS[14]#78868L, MS[15]#78869L, MS[16]#78870L, MS[17]#78871L, MS[18]#78872L, MS[19]#78873L, MS[20]#78874L, MS[21]#78875L, MS[22]#78876L, MS[23]#78877L, MS[24]#78878L, MS[25]#78879L, MS[26]#78880L, MS[27]#78881L, MS[28]#78882L, MS[29]#78883L, MS[30]#78884L, MS[31]#78885L, MS[32]#78886L, MS[33]#78887L, MS[34]#78888L, MS[35]#78889L, MS[36]#78890L, MS[37]#78891L, MS[38]#78892L, MS[39]#78893L, MS[40]#78894L, MS[41]#78895L, MS[42]#78896L, MS[43]#78897L, MS[44]#78898L, MS[45]#78899L, MS[46]#78900L, MS[47]#78901L, MS[48]#78902L, MS[49]#78903L, MS[50]#78904L, MS[51]#78905L, sum#79020L, sum#79021, sum#79022, count#79023L]
(5) Exchange
Input [59]: [segment#78787, processing_day#78789, count#79019L, MS[0]#78854L, MS[1]#78855L, MS[2]#78856L, MS[3]#78857L, MS[4]#78858L, MS[5]#78859L, MS[6]#78860L, MS[7]#78861L, MS[8]#78862L, MS[9]#78863L, MS[10]#78864L, MS[11]#78865L, MS[12]#78866L, MS[13]#78867L, MS[14]#78868L, MS[15]#78869L, MS[16]#78870L, MS[17]#78871L, MS[18]#78872L, MS[19]#78873L, MS[20]#78874L, MS[21]#78875L, MS[22]#78876L, MS[23]#78877L, MS[24]#78878L, MS[25]#78879L, MS[26]#78880L, MS[27]#78881L, MS[28]#78882L, MS[29]#78883L, MS[30]#78884L, MS[31]#78885L, MS[32]#78886L, MS[33]#78887L, MS[34]#78888L, MS[35]#78889L, MS[36]#78890L, MS[37]#78891L, MS[38]#78892L, MS[39]#78893L, MS[40]#78894L, MS[41]#78895L, MS[42]#78896L, MS[43]#78897L, MS[44]#78898L, MS[45]#78899L, MS[46]#78900L, MS[47]#78901L, MS[48]#78902L, MS[49]#78903L, MS[50]#78904L, MS[51]#78905L, sum#79020L, sum#79021, sum#79022, count#79023L]
Arguments: hashpartitioning(segment#78787, processing_day#78789, 200), ENSURE_REQUIREMENTS, [plan_id=7448]
(6) ShuffleQueryStage
Output [59]: [segment#78787, processing_day#78789, count#79019L, MS[0]#78854L, MS[1]#78855L, MS[2]#78856L, MS[3]#78857L, MS[4]#78858L, MS[5]#78859L, MS[6]#78860L, MS[7]#78861L, MS[8]#78862L, MS[9]#78863L, MS[10]#78864L, MS[11]#78865L, MS[12]#78866L, MS[13]#78867L, MS[14]#78868L, MS[15]#78869L, MS[16]#78870L, MS[17]#78871L, MS[18]#78872L, MS[19]#78873L, MS[20]#78874L, MS[21]#78875L, MS[22]#78876L, MS[23]#78877L, MS[24]#78878L, MS[25]#78879L, MS[26]#78880L, MS[27]#78881L, MS[28]#78882L, MS[29]#78883L, MS[30]#78884L, MS[31]#78885L, MS[32]#78886L, MS[33]#78887L, MS[34]#78888L, MS[35]#78889L, MS[36]#78890L, MS[37]#78891L, MS[38]#78892L, MS[39]#78893L, MS[40]#78894L, MS[41]#78895L, MS[42]#78896L, MS[43]#78897L, MS[44]#78898L, MS[45]#78899L, MS[46]#78900L, MS[47]#78901L, MS[48]#78902L, MS[49]#78903L, MS[50]#78904L, MS[51]#78905L, sum#79020L, sum#79021, sum#79022, count#79023L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#78787, processing_day#78789, count#79019L, MS[0]#78854L, MS[1]#78855L, MS[2]#78856L, MS[3]#78857L, MS[4]#78858L, MS[5]#78859L, MS[6]#78860L, MS[7]#78861L, MS[8]#78862L, MS[9]#78863L, MS[10]#78864L, MS[11]#78865L, MS[12]#78866L, MS[13]#78867L, MS[14]#78868L, MS[15]#78869L, MS[16]#78870L, MS[17]#78871L, MS[18]#78872L, MS[19]#78873L, MS[20]#78874L, MS[21]#78875L, MS[22]#78876L, MS[23]#78877L, MS[24]#78878L, MS[25]#78879L, MS[26]#78880L, MS[27]#78881L, MS[28]#78882L, MS[29]#78883L, MS[30]#78884L, MS[31]#78885L, MS[32]#78886L, MS[33]#78887L, MS[34]#78888L, MS[35]#78889L, MS[36]#78890L, MS[37]#78891L, MS[38]#78892L, MS[39]#78893L, MS[40]#78894L, MS[41]#78895L, MS[42]#78896L, MS[43]#78897L, MS[44]#78898L, MS[45]#78899L, MS[46]#78900L, MS[47]#78901L, MS[48]#78902L, MS[49]#78903L, MS[50]#78904L, MS[51]#78905L, sum#79020L, sum#79021, sum#79022, count#79023L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#78787, processing_day#78789, count#79019L, MS[0]#78854L, MS[1]#78855L, MS[2]#78856L, MS[3]#78857L, MS[4]#78858L, MS[5]#78859L, MS[6]#78860L, MS[7]#78861L, MS[8]#78862L, MS[9]#78863L, MS[10]#78864L, MS[11]#78865L, MS[12]#78866L, MS[13]#78867L, MS[14]#78868L, MS[15]#78869L, MS[16]#78870L, MS[17]#78871L, MS[18]#78872L, MS[19]#78873L, MS[20]#78874L, MS[21]#78875L, MS[22]#78876L, MS[23]#78877L, MS[24]#78878L, MS[25]#78879L, MS[26]#78880L, MS[27]#78881L, MS[28]#78882L, MS[29]#78883L, MS[30]#78884L, MS[31]#78885L, MS[32]#78886L, MS[33]#78887L, MS[34]#78888L, MS[35]#78889L, MS[36]#78890L, MS[37]#78891L, MS[38]#78892L, MS[39]#78893L, MS[40]#78894L, MS[41]#78895L, MS[42]#78896L, MS[43]#78897L, MS[44]#78898L, MS[45]#78899L, MS[46]#78900L, MS[47]#78901L, MS[48]#78902L, MS[49]#78903L, MS[50]#78904L, MS[51]#78905L, sum#79020L, sum#79021, sum#79022, count#79023L]
Keys [2]: [segment#78787, processing_day#78789]
Functions [5]: [count(1), approx_count_distinct(customer_id#78783L, 0.05, 0, 0), sum(events#78793), sum(weighted_amount#78795), avg(amount#78791)]
Aggregate Attributes [5]: [count(1)#78801L, approx_count_distinct(customer_id#78783L, 0.05, 0, 0)#78906L, sum(events#78793)#78907L, sum(weighted_amount#78795)#78908, avg(amount#78791)#78909]
Results [7]: [segment#78787, processing_day#78789, count(1)#78801L AS row_count#78796L, approx_count_distinct(customer_id#78783L, 0.05, 0, 0)#78906L AS unique_customers#78797L, sum(events#78793)#78907L AS event_sum#78798L, sum(weighted_amount#78795)#78908 AS weighted_amount_sum#78799, avg(amount#78791)#78909 AS avg_amount#78800]
(9) Exchange
Input [7]: [segment#78787, processing_day#78789, row_count#78796L, unique_customers#78797L, event_sum#78798L, weighted_amount_sum#78799, avg_amount#78800]
Arguments: rangepartitioning(segment#78787 ASC NULLS FIRST, processing_day#78789 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=7470]
(10) ShuffleQueryStage
Output [7]: [segment#78787, processing_day#78789, row_count#78796L, unique_customers#78797L, event_sum#78798L, weighted_amount_sum#78799, avg_amount#78800]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#78787, processing_day#78789, row_count#78796L, unique_customers#78797L, event_sum#78798L, weighted_amount_sum#78799, avg_amount#78800]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#78787, processing_day#78789, row_count#78796L, unique_customers#78797L, event_sum#78798L, weighted_amount_sum#78799, avg_amount#78800]
Arguments: [segment#78787 ASC NULLS FIRST, processing_day#78789 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#78787, processing_day#78789, row_count#78796L, unique_customers#78797L, event_sum#78798L, weighted_amount_sum#78799, avg_amount#78800]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#78783L, segment#78787, processing_day#78789, amount#78791, events#78793, weighted_amount#78795]
Keys [2]: [segment#78787, processing_day#78789]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#78783L, 0.05, 0, 0), partial_sum(events#78793), partial_sum(weighted_amount#78795), partial_avg(amount#78791)]
Aggregate Attributes [57]: [count#79014L, MS[0]#78802L, MS[1]#78803L, MS[2]#78804L, MS[3]#78805L, MS[4]#78806L, MS[5]#78807L, MS[6]#78808L, MS[7]#78809L, MS[8]#78810L, MS[9]#78811L, MS[10]#78812L, MS[11]#78813L, MS[12]#78814L, MS[13]#78815L, MS[14]#78816L, MS[15]#78817L, MS[16]#78818L, MS[17]#78819L, MS[18]#78820L, MS[19]#78821L, MS[20]#78822L, MS[21]#78823L, MS[22]#78824L, MS[23]#78825L, MS[24]#78826L, MS[25]#78827L, MS[26]#78828L, MS[27]#78829L, MS[28]#78830L, MS[29]#78831L, MS[30]#78832L, MS[31]#78833L, MS[32]#78834L, MS[33]#78835L, MS[34]#78836L, MS[35]#78837L, MS[36]#78838L, MS[37]#78839L, MS[38]#78840L, MS[39]#78841L, MS[40]#78842L, MS[41]#78843L, MS[42]#78844L, MS[43]#78845L, MS[44]#78846L, MS[45]#78847L, MS[46]#78848L, MS[47]#78849L, MS[48]#78850L, MS[49]#78851L, MS[50]#78852L, MS[51]#78853L, sum#79015L, sum#79016, sum#79017, count#79018L]
Results [59]: [segment#78787, processing_day#78789, count#79019L, MS[0]#78854L, MS[1]#78855L, MS[2]#78856L, MS[3]#78857L, MS[4]#78858L, MS[5]#78859L, MS[6]#78860L, MS[7]#78861L, MS[8]#78862L, MS[9]#78863L, MS[10]#78864L, MS[11]#78865L, MS[12]#78866L, MS[13]#78867L, MS[14]#78868L, MS[15]#78869L, MS[16]#78870L, MS[17]#78871L, MS[18]#78872L, MS[19]#78873L, MS[20]#78874L, MS[21]#78875L, MS[22]#78876L, MS[23]#78877L, MS[24]#78878L, MS[25]#78879L, MS[26]#78880L, MS[27]#78881L, MS[28]#78882L, MS[29]#78883L, MS[30]#78884L, MS[31]#78885L, MS[32]#78886L, MS[33]#78887L, MS[34]#78888L, MS[35]#78889L, MS[36]#78890L, MS[37]#78891L, MS[38]#78892L, MS[39]#78893L, MS[40]#78894L, MS[41]#78895L, MS[42]#78896L, MS[43]#78897L, MS[44]#78898L, MS[45]#78899L, MS[46]#78900L, MS[47]#78901L, MS[48]#78902L, MS[49]#78903L, MS[50]#78904L, MS[51]#78905L, sum#79020L, sum#79021, sum#79022, count#79023L]
(15) Exchange
Input [59]: [segment#78787, processing_day#78789, count#79019L, MS[0]#78854L, MS[1]#78855L, MS[2]#78856L, MS[3]#78857L, MS[4]#78858L, MS[5]#78859L, MS[6]#78860L, MS[7]#78861L, MS[8]#78862L, MS[9]#78863L, MS[10]#78864L, MS[11]#78865L, MS[12]#78866L, MS[13]#78867L, MS[14]#78868L, MS[15]#78869L, MS[16]#78870L, MS[17]#78871L, MS[18]#78872L, MS[19]#78873L, MS[20]#78874L, MS[21]#78875L, MS[22]#78876L, MS[23]#78877L, MS[24]#78878L, MS[25]#78879L, MS[26]#78880L, MS[27]#78881L, MS[28]#78882L, MS[29]#78883L, MS[30]#78884L, MS[31]#78885L, MS[32]#78886L, MS[33]#78887L, MS[34]#78888L, MS[35]#78889L, MS[36]#78890L, MS[37]#78891L, MS[38]#78892L, MS[39]#78893L, MS[40]#78894L, MS[41]#78895L, MS[42]#78896L, MS[43]#78897L, MS[44]#78898L, MS[45]#78899L, MS[46]#78900L, MS[47]#78901L, MS[48]#78902L, MS[49]#78903L, MS[50]#78904L, MS[51]#78905L, sum#79020L, sum#79021, sum#79022, count#79023L]
Arguments: hashpartitioning(segment#78787, processing_day#78789, 200), ENSURE_REQUIREMENTS, [plan_id=7428]
(16) HashAggregate
Input [59]: [segment#78787, processing_day#78789, count#79019L, MS[0]#78854L, MS[1]#78855L, MS[2]#78856L, MS[3]#78857L, MS[4]#78858L, MS[5]#78859L, MS[6]#78860L, MS[7]#78861L, MS[8]#78862L, MS[9]#78863L, MS[10]#78864L, MS[11]#78865L, MS[12]#78866L, MS[13]#78867L, MS[14]#78868L, MS[15]#78869L, MS[16]#78870L, MS[17]#78871L, MS[18]#78872L, MS[19]#78873L, MS[20]#78874L, MS[21]#78875L, MS[22]#78876L, MS[23]#78877L, MS[24]#78878L, MS[25]#78879L, MS[26]#78880L, MS[27]#78881L, MS[28]#78882L, MS[29]#78883L, MS[30]#78884L, MS[31]#78885L, MS[32]#78886L, MS[33]#78887L, MS[34]#78888L, MS[35]#78889L, MS[36]#78890L, MS[37]#78891L, MS[38]#78892L, MS[39]#78893L, MS[40]#78894L, MS[41]#78895L, MS[42]#78896L, MS[43]#78897L, MS[44]#78898L, MS[45]#78899L, MS[46]#78900L, MS[47]#78901L, MS[48]#78902L, MS[49]#78903L, MS[50]#78904L, MS[51]#78905L, sum#79020L, sum#79021, sum#79022, count#79023L]
Keys [2]: [segment#78787, processing_day#78789]
Functions [5]: [count(1), approx_count_distinct(customer_id#78783L, 0.05, 0, 0), sum(events#78793), sum(weighted_amount#78795), avg(amount#78791)]
Aggregate Attributes [5]: [count(1)#78801L, approx_count_distinct(customer_id#78783L, 0.05, 0, 0)#78906L, sum(events#78793)#78907L, sum(weighted_amount#78795)#78908, avg(amount#78791)#78909]
Results [7]: [segment#78787, processing_day#78789, count(1)#78801L AS row_count#78796L, approx_count_distinct(customer_id#78783L, 0.05, 0, 0)#78906L AS unique_customers#78797L, sum(events#78793)#78907L AS event_sum#78798L, sum(weighted_amount#78795)#78908 AS weighted_amount_sum#78799, avg(amount#78791)#78909 AS avg_amount#78800]
(17) Exchange
Input [7]: [segment#78787, processing_day#78789, row_count#78796L, unique_customers#78797L, event_sum#78798L, weighted_amount_sum#78799, avg_amount#78800]
Arguments: rangepartitioning(segment#78787 ASC NULLS FIRST, processing_day#78789 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=7431]
(18) Sort
Input [7]: [segment#78787, processing_day#78789, row_count#78796L, unique_customers#78797L, event_sum#78798L, weighted_amount_sum#78799, avg_amount#78800]
Arguments: [segment#78787 ASC NULLS FIRST, processing_day#78789 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#78787, processing_day#78789, row_count#78796L, unique_customers#78797L, event_sum#78798L, weighted_amount_sum#78799, avg_amount#78800]
Arguments: isFinalPlan=true