== 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#46039L]
Arguments: Range (4000000, 5000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#46039L % 250000) AS customer_id#46041L, concat(segment-, cast(cast((id#46039L % 12) as int) as string)) AS segment#46045, cast((id#46039L % 14) as int) AS processing_day#46047, ((cast(((id#46039L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#46049, cast((((id#46039L * 29) % 7) + 1) as int) AS events#46051]
Input [1]: [id#46039L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#46041L, segment#46045, processing_day#46047, amount#46049, events#46051, (amount#46049 * cast(events#46051 as double)) AS weighted_amount#46053]
Input [5]: [customer_id#46041L, segment#46045, processing_day#46047, amount#46049, events#46051]
(4) HashAggregate
Input [6]: [customer_id#46041L, segment#46045, processing_day#46047, amount#46049, events#46051, weighted_amount#46053]
Keys [2]: [segment#46045, processing_day#46047]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#46041L, 0.05, 0, 0), partial_sum(events#46051), partial_sum(weighted_amount#46053), partial_avg(amount#46049)]
Aggregate Attributes [57]: [count#46272L, MS[0]#46060L, MS[1]#46061L, MS[2]#46062L, MS[3]#46063L, MS[4]#46064L, MS[5]#46065L, MS[6]#46066L, MS[7]#46067L, MS[8]#46068L, MS[9]#46069L, MS[10]#46070L, MS[11]#46071L, MS[12]#46072L, MS[13]#46073L, MS[14]#46074L, MS[15]#46075L, MS[16]#46076L, MS[17]#46077L, MS[18]#46078L, MS[19]#46079L, MS[20]#46080L, MS[21]#46081L, MS[22]#46082L, MS[23]#46083L, MS[24]#46084L, MS[25]#46085L, MS[26]#46086L, MS[27]#46087L, MS[28]#46088L, MS[29]#46089L, MS[30]#46090L, MS[31]#46091L, MS[32]#46092L, MS[33]#46093L, MS[34]#46094L, MS[35]#46095L, MS[36]#46096L, MS[37]#46097L, MS[38]#46098L, MS[39]#46099L, MS[40]#46100L, MS[41]#46101L, MS[42]#46102L, MS[43]#46103L, MS[44]#46104L, MS[45]#46105L, MS[46]#46106L, MS[47]#46107L, MS[48]#46108L, MS[49]#46109L, MS[50]#46110L, MS[51]#46111L, sum#46273L, sum#46274, sum#46275, count#46276L]
Results [59]: [segment#46045, processing_day#46047, count#46277L, MS[0]#46112L, MS[1]#46113L, MS[2]#46114L, MS[3]#46115L, MS[4]#46116L, MS[5]#46117L, MS[6]#46118L, MS[7]#46119L, MS[8]#46120L, MS[9]#46121L, MS[10]#46122L, MS[11]#46123L, MS[12]#46124L, MS[13]#46125L, MS[14]#46126L, MS[15]#46127L, MS[16]#46128L, MS[17]#46129L, MS[18]#46130L, MS[19]#46131L, MS[20]#46132L, MS[21]#46133L, MS[22]#46134L, MS[23]#46135L, MS[24]#46136L, MS[25]#46137L, MS[26]#46138L, MS[27]#46139L, MS[28]#46140L, MS[29]#46141L, MS[30]#46142L, MS[31]#46143L, MS[32]#46144L, MS[33]#46145L, MS[34]#46146L, MS[35]#46147L, MS[36]#46148L, MS[37]#46149L, MS[38]#46150L, MS[39]#46151L, MS[40]#46152L, MS[41]#46153L, MS[42]#46154L, MS[43]#46155L, MS[44]#46156L, MS[45]#46157L, MS[46]#46158L, MS[47]#46159L, MS[48]#46160L, MS[49]#46161L, MS[50]#46162L, MS[51]#46163L, sum#46278L, sum#46279, sum#46280, count#46281L]
(5) Exchange
Input [59]: [segment#46045, processing_day#46047, count#46277L, MS[0]#46112L, MS[1]#46113L, MS[2]#46114L, MS[3]#46115L, MS[4]#46116L, MS[5]#46117L, MS[6]#46118L, MS[7]#46119L, MS[8]#46120L, MS[9]#46121L, MS[10]#46122L, MS[11]#46123L, MS[12]#46124L, MS[13]#46125L, MS[14]#46126L, MS[15]#46127L, MS[16]#46128L, MS[17]#46129L, MS[18]#46130L, MS[19]#46131L, MS[20]#46132L, MS[21]#46133L, MS[22]#46134L, MS[23]#46135L, MS[24]#46136L, MS[25]#46137L, MS[26]#46138L, MS[27]#46139L, MS[28]#46140L, MS[29]#46141L, MS[30]#46142L, MS[31]#46143L, MS[32]#46144L, MS[33]#46145L, MS[34]#46146L, MS[35]#46147L, MS[36]#46148L, MS[37]#46149L, MS[38]#46150L, MS[39]#46151L, MS[40]#46152L, MS[41]#46153L, MS[42]#46154L, MS[43]#46155L, MS[44]#46156L, MS[45]#46157L, MS[46]#46158L, MS[47]#46159L, MS[48]#46160L, MS[49]#46161L, MS[50]#46162L, MS[51]#46163L, sum#46278L, sum#46279, sum#46280, count#46281L]
Arguments: hashpartitioning(segment#46045, processing_day#46047, 200), ENSURE_REQUIREMENTS, [plan_id=4371]
(6) ShuffleQueryStage
Output [59]: [segment#46045, processing_day#46047, count#46277L, MS[0]#46112L, MS[1]#46113L, MS[2]#46114L, MS[3]#46115L, MS[4]#46116L, MS[5]#46117L, MS[6]#46118L, MS[7]#46119L, MS[8]#46120L, MS[9]#46121L, MS[10]#46122L, MS[11]#46123L, MS[12]#46124L, MS[13]#46125L, MS[14]#46126L, MS[15]#46127L, MS[16]#46128L, MS[17]#46129L, MS[18]#46130L, MS[19]#46131L, MS[20]#46132L, MS[21]#46133L, MS[22]#46134L, MS[23]#46135L, MS[24]#46136L, MS[25]#46137L, MS[26]#46138L, MS[27]#46139L, MS[28]#46140L, MS[29]#46141L, MS[30]#46142L, MS[31]#46143L, MS[32]#46144L, MS[33]#46145L, MS[34]#46146L, MS[35]#46147L, MS[36]#46148L, MS[37]#46149L, MS[38]#46150L, MS[39]#46151L, MS[40]#46152L, MS[41]#46153L, MS[42]#46154L, MS[43]#46155L, MS[44]#46156L, MS[45]#46157L, MS[46]#46158L, MS[47]#46159L, MS[48]#46160L, MS[49]#46161L, MS[50]#46162L, MS[51]#46163L, sum#46278L, sum#46279, sum#46280, count#46281L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#46045, processing_day#46047, count#46277L, MS[0]#46112L, MS[1]#46113L, MS[2]#46114L, MS[3]#46115L, MS[4]#46116L, MS[5]#46117L, MS[6]#46118L, MS[7]#46119L, MS[8]#46120L, MS[9]#46121L, MS[10]#46122L, MS[11]#46123L, MS[12]#46124L, MS[13]#46125L, MS[14]#46126L, MS[15]#46127L, MS[16]#46128L, MS[17]#46129L, MS[18]#46130L, MS[19]#46131L, MS[20]#46132L, MS[21]#46133L, MS[22]#46134L, MS[23]#46135L, MS[24]#46136L, MS[25]#46137L, MS[26]#46138L, MS[27]#46139L, MS[28]#46140L, MS[29]#46141L, MS[30]#46142L, MS[31]#46143L, MS[32]#46144L, MS[33]#46145L, MS[34]#46146L, MS[35]#46147L, MS[36]#46148L, MS[37]#46149L, MS[38]#46150L, MS[39]#46151L, MS[40]#46152L, MS[41]#46153L, MS[42]#46154L, MS[43]#46155L, MS[44]#46156L, MS[45]#46157L, MS[46]#46158L, MS[47]#46159L, MS[48]#46160L, MS[49]#46161L, MS[50]#46162L, MS[51]#46163L, sum#46278L, sum#46279, sum#46280, count#46281L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#46045, processing_day#46047, count#46277L, MS[0]#46112L, MS[1]#46113L, MS[2]#46114L, MS[3]#46115L, MS[4]#46116L, MS[5]#46117L, MS[6]#46118L, MS[7]#46119L, MS[8]#46120L, MS[9]#46121L, MS[10]#46122L, MS[11]#46123L, MS[12]#46124L, MS[13]#46125L, MS[14]#46126L, MS[15]#46127L, MS[16]#46128L, MS[17]#46129L, MS[18]#46130L, MS[19]#46131L, MS[20]#46132L, MS[21]#46133L, MS[22]#46134L, MS[23]#46135L, MS[24]#46136L, MS[25]#46137L, MS[26]#46138L, MS[27]#46139L, MS[28]#46140L, MS[29]#46141L, MS[30]#46142L, MS[31]#46143L, MS[32]#46144L, MS[33]#46145L, MS[34]#46146L, MS[35]#46147L, MS[36]#46148L, MS[37]#46149L, MS[38]#46150L, MS[39]#46151L, MS[40]#46152L, MS[41]#46153L, MS[42]#46154L, MS[43]#46155L, MS[44]#46156L, MS[45]#46157L, MS[46]#46158L, MS[47]#46159L, MS[48]#46160L, MS[49]#46161L, MS[50]#46162L, MS[51]#46163L, sum#46278L, sum#46279, sum#46280, count#46281L]
Keys [2]: [segment#46045, processing_day#46047]
Functions [5]: [count(1), approx_count_distinct(customer_id#46041L, 0.05, 0, 0), sum(events#46051), sum(weighted_amount#46053), avg(amount#46049)]
Aggregate Attributes [5]: [count(1)#46059L, approx_count_distinct(customer_id#46041L, 0.05, 0, 0)#46164L, sum(events#46051)#46165L, sum(weighted_amount#46053)#46166, avg(amount#46049)#46167]
Results [7]: [segment#46045, processing_day#46047, count(1)#46059L AS row_count#46054L, approx_count_distinct(customer_id#46041L, 0.05, 0, 0)#46164L AS unique_customers#46055L, sum(events#46051)#46165L AS event_sum#46056L, sum(weighted_amount#46053)#46166 AS weighted_amount_sum#46057, avg(amount#46049)#46167 AS avg_amount#46058]
(9) Exchange
Input [7]: [segment#46045, processing_day#46047, row_count#46054L, unique_customers#46055L, event_sum#46056L, weighted_amount_sum#46057, avg_amount#46058]
Arguments: rangepartitioning(segment#46045 ASC NULLS FIRST, processing_day#46047 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=4393]
(10) ShuffleQueryStage
Output [7]: [segment#46045, processing_day#46047, row_count#46054L, unique_customers#46055L, event_sum#46056L, weighted_amount_sum#46057, avg_amount#46058]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#46045, processing_day#46047, row_count#46054L, unique_customers#46055L, event_sum#46056L, weighted_amount_sum#46057, avg_amount#46058]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#46045, processing_day#46047, row_count#46054L, unique_customers#46055L, event_sum#46056L, weighted_amount_sum#46057, avg_amount#46058]
Arguments: [segment#46045 ASC NULLS FIRST, processing_day#46047 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#46045, processing_day#46047, row_count#46054L, unique_customers#46055L, event_sum#46056L, weighted_amount_sum#46057, avg_amount#46058]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#46041L, segment#46045, processing_day#46047, amount#46049, events#46051, weighted_amount#46053]
Keys [2]: [segment#46045, processing_day#46047]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#46041L, 0.05, 0, 0), partial_sum(events#46051), partial_sum(weighted_amount#46053), partial_avg(amount#46049)]
Aggregate Attributes [57]: [count#46272L, MS[0]#46060L, MS[1]#46061L, MS[2]#46062L, MS[3]#46063L, MS[4]#46064L, MS[5]#46065L, MS[6]#46066L, MS[7]#46067L, MS[8]#46068L, MS[9]#46069L, MS[10]#46070L, MS[11]#46071L, MS[12]#46072L, MS[13]#46073L, MS[14]#46074L, MS[15]#46075L, MS[16]#46076L, MS[17]#46077L, MS[18]#46078L, MS[19]#46079L, MS[20]#46080L, MS[21]#46081L, MS[22]#46082L, MS[23]#46083L, MS[24]#46084L, MS[25]#46085L, MS[26]#46086L, MS[27]#46087L, MS[28]#46088L, MS[29]#46089L, MS[30]#46090L, MS[31]#46091L, MS[32]#46092L, MS[33]#46093L, MS[34]#46094L, MS[35]#46095L, MS[36]#46096L, MS[37]#46097L, MS[38]#46098L, MS[39]#46099L, MS[40]#46100L, MS[41]#46101L, MS[42]#46102L, MS[43]#46103L, MS[44]#46104L, MS[45]#46105L, MS[46]#46106L, MS[47]#46107L, MS[48]#46108L, MS[49]#46109L, MS[50]#46110L, MS[51]#46111L, sum#46273L, sum#46274, sum#46275, count#46276L]
Results [59]: [segment#46045, processing_day#46047, count#46277L, MS[0]#46112L, MS[1]#46113L, MS[2]#46114L, MS[3]#46115L, MS[4]#46116L, MS[5]#46117L, MS[6]#46118L, MS[7]#46119L, MS[8]#46120L, MS[9]#46121L, MS[10]#46122L, MS[11]#46123L, MS[12]#46124L, MS[13]#46125L, MS[14]#46126L, MS[15]#46127L, MS[16]#46128L, MS[17]#46129L, MS[18]#46130L, MS[19]#46131L, MS[20]#46132L, MS[21]#46133L, MS[22]#46134L, MS[23]#46135L, MS[24]#46136L, MS[25]#46137L, MS[26]#46138L, MS[27]#46139L, MS[28]#46140L, MS[29]#46141L, MS[30]#46142L, MS[31]#46143L, MS[32]#46144L, MS[33]#46145L, MS[34]#46146L, MS[35]#46147L, MS[36]#46148L, MS[37]#46149L, MS[38]#46150L, MS[39]#46151L, MS[40]#46152L, MS[41]#46153L, MS[42]#46154L, MS[43]#46155L, MS[44]#46156L, MS[45]#46157L, MS[46]#46158L, MS[47]#46159L, MS[48]#46160L, MS[49]#46161L, MS[50]#46162L, MS[51]#46163L, sum#46278L, sum#46279, sum#46280, count#46281L]
(15) Exchange
Input [59]: [segment#46045, processing_day#46047, count#46277L, MS[0]#46112L, MS[1]#46113L, MS[2]#46114L, MS[3]#46115L, MS[4]#46116L, MS[5]#46117L, MS[6]#46118L, MS[7]#46119L, MS[8]#46120L, MS[9]#46121L, MS[10]#46122L, MS[11]#46123L, MS[12]#46124L, MS[13]#46125L, MS[14]#46126L, MS[15]#46127L, MS[16]#46128L, MS[17]#46129L, MS[18]#46130L, MS[19]#46131L, MS[20]#46132L, MS[21]#46133L, MS[22]#46134L, MS[23]#46135L, MS[24]#46136L, MS[25]#46137L, MS[26]#46138L, MS[27]#46139L, MS[28]#46140L, MS[29]#46141L, MS[30]#46142L, MS[31]#46143L, MS[32]#46144L, MS[33]#46145L, MS[34]#46146L, MS[35]#46147L, MS[36]#46148L, MS[37]#46149L, MS[38]#46150L, MS[39]#46151L, MS[40]#46152L, MS[41]#46153L, MS[42]#46154L, MS[43]#46155L, MS[44]#46156L, MS[45]#46157L, MS[46]#46158L, MS[47]#46159L, MS[48]#46160L, MS[49]#46161L, MS[50]#46162L, MS[51]#46163L, sum#46278L, sum#46279, sum#46280, count#46281L]
Arguments: hashpartitioning(segment#46045, processing_day#46047, 200), ENSURE_REQUIREMENTS, [plan_id=4351]
(16) HashAggregate
Input [59]: [segment#46045, processing_day#46047, count#46277L, MS[0]#46112L, MS[1]#46113L, MS[2]#46114L, MS[3]#46115L, MS[4]#46116L, MS[5]#46117L, MS[6]#46118L, MS[7]#46119L, MS[8]#46120L, MS[9]#46121L, MS[10]#46122L, MS[11]#46123L, MS[12]#46124L, MS[13]#46125L, MS[14]#46126L, MS[15]#46127L, MS[16]#46128L, MS[17]#46129L, MS[18]#46130L, MS[19]#46131L, MS[20]#46132L, MS[21]#46133L, MS[22]#46134L, MS[23]#46135L, MS[24]#46136L, MS[25]#46137L, MS[26]#46138L, MS[27]#46139L, MS[28]#46140L, MS[29]#46141L, MS[30]#46142L, MS[31]#46143L, MS[32]#46144L, MS[33]#46145L, MS[34]#46146L, MS[35]#46147L, MS[36]#46148L, MS[37]#46149L, MS[38]#46150L, MS[39]#46151L, MS[40]#46152L, MS[41]#46153L, MS[42]#46154L, MS[43]#46155L, MS[44]#46156L, MS[45]#46157L, MS[46]#46158L, MS[47]#46159L, MS[48]#46160L, MS[49]#46161L, MS[50]#46162L, MS[51]#46163L, sum#46278L, sum#46279, sum#46280, count#46281L]
Keys [2]: [segment#46045, processing_day#46047]
Functions [5]: [count(1), approx_count_distinct(customer_id#46041L, 0.05, 0, 0), sum(events#46051), sum(weighted_amount#46053), avg(amount#46049)]
Aggregate Attributes [5]: [count(1)#46059L, approx_count_distinct(customer_id#46041L, 0.05, 0, 0)#46164L, sum(events#46051)#46165L, sum(weighted_amount#46053)#46166, avg(amount#46049)#46167]
Results [7]: [segment#46045, processing_day#46047, count(1)#46059L AS row_count#46054L, approx_count_distinct(customer_id#46041L, 0.05, 0, 0)#46164L AS unique_customers#46055L, sum(events#46051)#46165L AS event_sum#46056L, sum(weighted_amount#46053)#46166 AS weighted_amount_sum#46057, avg(amount#46049)#46167 AS avg_amount#46058]
(17) Exchange
Input [7]: [segment#46045, processing_day#46047, row_count#46054L, unique_customers#46055L, event_sum#46056L, weighted_amount_sum#46057, avg_amount#46058]
Arguments: rangepartitioning(segment#46045 ASC NULLS FIRST, processing_day#46047 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=4354]
(18) Sort
Input [7]: [segment#46045, processing_day#46047, row_count#46054L, unique_customers#46055L, event_sum#46056L, weighted_amount_sum#46057, avg_amount#46058]
Arguments: [segment#46045 ASC NULLS FIRST, processing_day#46047 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#46045, processing_day#46047, row_count#46054L, unique_customers#46055L, event_sum#46056L, weighted_amount_sum#46057, avg_amount#46058]
Arguments: isFinalPlan=true