== 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#85003L]
Arguments: Range (0, 1000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#85003L % 250000) AS customer_id#85005L, concat(segment-, cast(cast((id#85003L % 12) as int) as string)) AS segment#85009, cast((id#85003L % 14) as int) AS processing_day#85011, ((cast(((id#85003L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#85013, cast((((id#85003L * 29) % 7) + 1) as int) AS events#85015]
Input [1]: [id#85003L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#85005L, segment#85009, processing_day#85011, amount#85013, events#85015, (amount#85013 * cast(events#85015 as double)) AS weighted_amount#85017]
Input [5]: [customer_id#85005L, segment#85009, processing_day#85011, amount#85013, events#85015]
(4) HashAggregate
Input [6]: [customer_id#85005L, segment#85009, processing_day#85011, amount#85013, events#85015, weighted_amount#85017]
Keys [2]: [segment#85009, processing_day#85011]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#85005L, 0.05, 0, 0), partial_sum(events#85015), partial_sum(weighted_amount#85017), partial_avg(amount#85013)]
Aggregate Attributes [57]: [count#85236L, MS[0]#85024L, MS[1]#85025L, MS[2]#85026L, MS[3]#85027L, MS[4]#85028L, MS[5]#85029L, MS[6]#85030L, MS[7]#85031L, MS[8]#85032L, MS[9]#85033L, MS[10]#85034L, MS[11]#85035L, MS[12]#85036L, MS[13]#85037L, MS[14]#85038L, MS[15]#85039L, MS[16]#85040L, MS[17]#85041L, MS[18]#85042L, MS[19]#85043L, MS[20]#85044L, MS[21]#85045L, MS[22]#85046L, MS[23]#85047L, MS[24]#85048L, MS[25]#85049L, MS[26]#85050L, MS[27]#85051L, MS[28]#85052L, MS[29]#85053L, MS[30]#85054L, MS[31]#85055L, MS[32]#85056L, MS[33]#85057L, MS[34]#85058L, MS[35]#85059L, MS[36]#85060L, MS[37]#85061L, MS[38]#85062L, MS[39]#85063L, MS[40]#85064L, MS[41]#85065L, MS[42]#85066L, MS[43]#85067L, MS[44]#85068L, MS[45]#85069L, MS[46]#85070L, MS[47]#85071L, MS[48]#85072L, MS[49]#85073L, MS[50]#85074L, MS[51]#85075L, sum#85237L, sum#85238, sum#85239, count#85240L]
Results [59]: [segment#85009, processing_day#85011, count#85241L, MS[0]#85076L, MS[1]#85077L, MS[2]#85078L, MS[3]#85079L, MS[4]#85080L, MS[5]#85081L, MS[6]#85082L, MS[7]#85083L, MS[8]#85084L, MS[9]#85085L, MS[10]#85086L, MS[11]#85087L, MS[12]#85088L, MS[13]#85089L, MS[14]#85090L, MS[15]#85091L, MS[16]#85092L, MS[17]#85093L, MS[18]#85094L, MS[19]#85095L, MS[20]#85096L, MS[21]#85097L, MS[22]#85098L, MS[23]#85099L, MS[24]#85100L, MS[25]#85101L, MS[26]#85102L, MS[27]#85103L, MS[28]#85104L, MS[29]#85105L, MS[30]#85106L, MS[31]#85107L, MS[32]#85108L, MS[33]#85109L, MS[34]#85110L, MS[35]#85111L, MS[36]#85112L, MS[37]#85113L, MS[38]#85114L, MS[39]#85115L, MS[40]#85116L, MS[41]#85117L, MS[42]#85118L, MS[43]#85119L, MS[44]#85120L, MS[45]#85121L, MS[46]#85122L, MS[47]#85123L, MS[48]#85124L, MS[49]#85125L, MS[50]#85126L, MS[51]#85127L, sum#85242L, sum#85243, sum#85244, count#85245L]
(5) Exchange
Input [59]: [segment#85009, processing_day#85011, count#85241L, MS[0]#85076L, MS[1]#85077L, MS[2]#85078L, MS[3]#85079L, MS[4]#85080L, MS[5]#85081L, MS[6]#85082L, MS[7]#85083L, MS[8]#85084L, MS[9]#85085L, MS[10]#85086L, MS[11]#85087L, MS[12]#85088L, MS[13]#85089L, MS[14]#85090L, MS[15]#85091L, MS[16]#85092L, MS[17]#85093L, MS[18]#85094L, MS[19]#85095L, MS[20]#85096L, MS[21]#85097L, MS[22]#85098L, MS[23]#85099L, MS[24]#85100L, MS[25]#85101L, MS[26]#85102L, MS[27]#85103L, MS[28]#85104L, MS[29]#85105L, MS[30]#85106L, MS[31]#85107L, MS[32]#85108L, MS[33]#85109L, MS[34]#85110L, MS[35]#85111L, MS[36]#85112L, MS[37]#85113L, MS[38]#85114L, MS[39]#85115L, MS[40]#85116L, MS[41]#85117L, MS[42]#85118L, MS[43]#85119L, MS[44]#85120L, MS[45]#85121L, MS[46]#85122L, MS[47]#85123L, MS[48]#85124L, MS[49]#85125L, MS[50]#85126L, MS[51]#85127L, sum#85242L, sum#85243, sum#85244, count#85245L]
Arguments: hashpartitioning(segment#85009, processing_day#85011, 200), ENSURE_REQUIREMENTS, [plan_id=8035]
(6) ShuffleQueryStage
Output [59]: [segment#85009, processing_day#85011, count#85241L, MS[0]#85076L, MS[1]#85077L, MS[2]#85078L, MS[3]#85079L, MS[4]#85080L, MS[5]#85081L, MS[6]#85082L, MS[7]#85083L, MS[8]#85084L, MS[9]#85085L, MS[10]#85086L, MS[11]#85087L, MS[12]#85088L, MS[13]#85089L, MS[14]#85090L, MS[15]#85091L, MS[16]#85092L, MS[17]#85093L, MS[18]#85094L, MS[19]#85095L, MS[20]#85096L, MS[21]#85097L, MS[22]#85098L, MS[23]#85099L, MS[24]#85100L, MS[25]#85101L, MS[26]#85102L, MS[27]#85103L, MS[28]#85104L, MS[29]#85105L, MS[30]#85106L, MS[31]#85107L, MS[32]#85108L, MS[33]#85109L, MS[34]#85110L, MS[35]#85111L, MS[36]#85112L, MS[37]#85113L, MS[38]#85114L, MS[39]#85115L, MS[40]#85116L, MS[41]#85117L, MS[42]#85118L, MS[43]#85119L, MS[44]#85120L, MS[45]#85121L, MS[46]#85122L, MS[47]#85123L, MS[48]#85124L, MS[49]#85125L, MS[50]#85126L, MS[51]#85127L, sum#85242L, sum#85243, sum#85244, count#85245L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#85009, processing_day#85011, count#85241L, MS[0]#85076L, MS[1]#85077L, MS[2]#85078L, MS[3]#85079L, MS[4]#85080L, MS[5]#85081L, MS[6]#85082L, MS[7]#85083L, MS[8]#85084L, MS[9]#85085L, MS[10]#85086L, MS[11]#85087L, MS[12]#85088L, MS[13]#85089L, MS[14]#85090L, MS[15]#85091L, MS[16]#85092L, MS[17]#85093L, MS[18]#85094L, MS[19]#85095L, MS[20]#85096L, MS[21]#85097L, MS[22]#85098L, MS[23]#85099L, MS[24]#85100L, MS[25]#85101L, MS[26]#85102L, MS[27]#85103L, MS[28]#85104L, MS[29]#85105L, MS[30]#85106L, MS[31]#85107L, MS[32]#85108L, MS[33]#85109L, MS[34]#85110L, MS[35]#85111L, MS[36]#85112L, MS[37]#85113L, MS[38]#85114L, MS[39]#85115L, MS[40]#85116L, MS[41]#85117L, MS[42]#85118L, MS[43]#85119L, MS[44]#85120L, MS[45]#85121L, MS[46]#85122L, MS[47]#85123L, MS[48]#85124L, MS[49]#85125L, MS[50]#85126L, MS[51]#85127L, sum#85242L, sum#85243, sum#85244, count#85245L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#85009, processing_day#85011, count#85241L, MS[0]#85076L, MS[1]#85077L, MS[2]#85078L, MS[3]#85079L, MS[4]#85080L, MS[5]#85081L, MS[6]#85082L, MS[7]#85083L, MS[8]#85084L, MS[9]#85085L, MS[10]#85086L, MS[11]#85087L, MS[12]#85088L, MS[13]#85089L, MS[14]#85090L, MS[15]#85091L, MS[16]#85092L, MS[17]#85093L, MS[18]#85094L, MS[19]#85095L, MS[20]#85096L, MS[21]#85097L, MS[22]#85098L, MS[23]#85099L, MS[24]#85100L, MS[25]#85101L, MS[26]#85102L, MS[27]#85103L, MS[28]#85104L, MS[29]#85105L, MS[30]#85106L, MS[31]#85107L, MS[32]#85108L, MS[33]#85109L, MS[34]#85110L, MS[35]#85111L, MS[36]#85112L, MS[37]#85113L, MS[38]#85114L, MS[39]#85115L, MS[40]#85116L, MS[41]#85117L, MS[42]#85118L, MS[43]#85119L, MS[44]#85120L, MS[45]#85121L, MS[46]#85122L, MS[47]#85123L, MS[48]#85124L, MS[49]#85125L, MS[50]#85126L, MS[51]#85127L, sum#85242L, sum#85243, sum#85244, count#85245L]
Keys [2]: [segment#85009, processing_day#85011]
Functions [5]: [count(1), approx_count_distinct(customer_id#85005L, 0.05, 0, 0), sum(events#85015), sum(weighted_amount#85017), avg(amount#85013)]
Aggregate Attributes [5]: [count(1)#85023L, approx_count_distinct(customer_id#85005L, 0.05, 0, 0)#85128L, sum(events#85015)#85129L, sum(weighted_amount#85017)#85130, avg(amount#85013)#85131]
Results [7]: [segment#85009, processing_day#85011, count(1)#85023L AS row_count#85018L, approx_count_distinct(customer_id#85005L, 0.05, 0, 0)#85128L AS unique_customers#85019L, sum(events#85015)#85129L AS event_sum#85020L, sum(weighted_amount#85017)#85130 AS weighted_amount_sum#85021, avg(amount#85013)#85131 AS avg_amount#85022]
(9) Exchange
Input [7]: [segment#85009, processing_day#85011, row_count#85018L, unique_customers#85019L, event_sum#85020L, weighted_amount_sum#85021, avg_amount#85022]
Arguments: rangepartitioning(segment#85009 ASC NULLS FIRST, processing_day#85011 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=8057]
(10) ShuffleQueryStage
Output [7]: [segment#85009, processing_day#85011, row_count#85018L, unique_customers#85019L, event_sum#85020L, weighted_amount_sum#85021, avg_amount#85022]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#85009, processing_day#85011, row_count#85018L, unique_customers#85019L, event_sum#85020L, weighted_amount_sum#85021, avg_amount#85022]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#85009, processing_day#85011, row_count#85018L, unique_customers#85019L, event_sum#85020L, weighted_amount_sum#85021, avg_amount#85022]
Arguments: [segment#85009 ASC NULLS FIRST, processing_day#85011 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#85009, processing_day#85011, row_count#85018L, unique_customers#85019L, event_sum#85020L, weighted_amount_sum#85021, avg_amount#85022]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#85005L, segment#85009, processing_day#85011, amount#85013, events#85015, weighted_amount#85017]
Keys [2]: [segment#85009, processing_day#85011]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#85005L, 0.05, 0, 0), partial_sum(events#85015), partial_sum(weighted_amount#85017), partial_avg(amount#85013)]
Aggregate Attributes [57]: [count#85236L, MS[0]#85024L, MS[1]#85025L, MS[2]#85026L, MS[3]#85027L, MS[4]#85028L, MS[5]#85029L, MS[6]#85030L, MS[7]#85031L, MS[8]#85032L, MS[9]#85033L, MS[10]#85034L, MS[11]#85035L, MS[12]#85036L, MS[13]#85037L, MS[14]#85038L, MS[15]#85039L, MS[16]#85040L, MS[17]#85041L, MS[18]#85042L, MS[19]#85043L, MS[20]#85044L, MS[21]#85045L, MS[22]#85046L, MS[23]#85047L, MS[24]#85048L, MS[25]#85049L, MS[26]#85050L, MS[27]#85051L, MS[28]#85052L, MS[29]#85053L, MS[30]#85054L, MS[31]#85055L, MS[32]#85056L, MS[33]#85057L, MS[34]#85058L, MS[35]#85059L, MS[36]#85060L, MS[37]#85061L, MS[38]#85062L, MS[39]#85063L, MS[40]#85064L, MS[41]#85065L, MS[42]#85066L, MS[43]#85067L, MS[44]#85068L, MS[45]#85069L, MS[46]#85070L, MS[47]#85071L, MS[48]#85072L, MS[49]#85073L, MS[50]#85074L, MS[51]#85075L, sum#85237L, sum#85238, sum#85239, count#85240L]
Results [59]: [segment#85009, processing_day#85011, count#85241L, MS[0]#85076L, MS[1]#85077L, MS[2]#85078L, MS[3]#85079L, MS[4]#85080L, MS[5]#85081L, MS[6]#85082L, MS[7]#85083L, MS[8]#85084L, MS[9]#85085L, MS[10]#85086L, MS[11]#85087L, MS[12]#85088L, MS[13]#85089L, MS[14]#85090L, MS[15]#85091L, MS[16]#85092L, MS[17]#85093L, MS[18]#85094L, MS[19]#85095L, MS[20]#85096L, MS[21]#85097L, MS[22]#85098L, MS[23]#85099L, MS[24]#85100L, MS[25]#85101L, MS[26]#85102L, MS[27]#85103L, MS[28]#85104L, MS[29]#85105L, MS[30]#85106L, MS[31]#85107L, MS[32]#85108L, MS[33]#85109L, MS[34]#85110L, MS[35]#85111L, MS[36]#85112L, MS[37]#85113L, MS[38]#85114L, MS[39]#85115L, MS[40]#85116L, MS[41]#85117L, MS[42]#85118L, MS[43]#85119L, MS[44]#85120L, MS[45]#85121L, MS[46]#85122L, MS[47]#85123L, MS[48]#85124L, MS[49]#85125L, MS[50]#85126L, MS[51]#85127L, sum#85242L, sum#85243, sum#85244, count#85245L]
(15) Exchange
Input [59]: [segment#85009, processing_day#85011, count#85241L, MS[0]#85076L, MS[1]#85077L, MS[2]#85078L, MS[3]#85079L, MS[4]#85080L, MS[5]#85081L, MS[6]#85082L, MS[7]#85083L, MS[8]#85084L, MS[9]#85085L, MS[10]#85086L, MS[11]#85087L, MS[12]#85088L, MS[13]#85089L, MS[14]#85090L, MS[15]#85091L, MS[16]#85092L, MS[17]#85093L, MS[18]#85094L, MS[19]#85095L, MS[20]#85096L, MS[21]#85097L, MS[22]#85098L, MS[23]#85099L, MS[24]#85100L, MS[25]#85101L, MS[26]#85102L, MS[27]#85103L, MS[28]#85104L, MS[29]#85105L, MS[30]#85106L, MS[31]#85107L, MS[32]#85108L, MS[33]#85109L, MS[34]#85110L, MS[35]#85111L, MS[36]#85112L, MS[37]#85113L, MS[38]#85114L, MS[39]#85115L, MS[40]#85116L, MS[41]#85117L, MS[42]#85118L, MS[43]#85119L, MS[44]#85120L, MS[45]#85121L, MS[46]#85122L, MS[47]#85123L, MS[48]#85124L, MS[49]#85125L, MS[50]#85126L, MS[51]#85127L, sum#85242L, sum#85243, sum#85244, count#85245L]
Arguments: hashpartitioning(segment#85009, processing_day#85011, 200), ENSURE_REQUIREMENTS, [plan_id=8015]
(16) HashAggregate
Input [59]: [segment#85009, processing_day#85011, count#85241L, MS[0]#85076L, MS[1]#85077L, MS[2]#85078L, MS[3]#85079L, MS[4]#85080L, MS[5]#85081L, MS[6]#85082L, MS[7]#85083L, MS[8]#85084L, MS[9]#85085L, MS[10]#85086L, MS[11]#85087L, MS[12]#85088L, MS[13]#85089L, MS[14]#85090L, MS[15]#85091L, MS[16]#85092L, MS[17]#85093L, MS[18]#85094L, MS[19]#85095L, MS[20]#85096L, MS[21]#85097L, MS[22]#85098L, MS[23]#85099L, MS[24]#85100L, MS[25]#85101L, MS[26]#85102L, MS[27]#85103L, MS[28]#85104L, MS[29]#85105L, MS[30]#85106L, MS[31]#85107L, MS[32]#85108L, MS[33]#85109L, MS[34]#85110L, MS[35]#85111L, MS[36]#85112L, MS[37]#85113L, MS[38]#85114L, MS[39]#85115L, MS[40]#85116L, MS[41]#85117L, MS[42]#85118L, MS[43]#85119L, MS[44]#85120L, MS[45]#85121L, MS[46]#85122L, MS[47]#85123L, MS[48]#85124L, MS[49]#85125L, MS[50]#85126L, MS[51]#85127L, sum#85242L, sum#85243, sum#85244, count#85245L]
Keys [2]: [segment#85009, processing_day#85011]
Functions [5]: [count(1), approx_count_distinct(customer_id#85005L, 0.05, 0, 0), sum(events#85015), sum(weighted_amount#85017), avg(amount#85013)]
Aggregate Attributes [5]: [count(1)#85023L, approx_count_distinct(customer_id#85005L, 0.05, 0, 0)#85128L, sum(events#85015)#85129L, sum(weighted_amount#85017)#85130, avg(amount#85013)#85131]
Results [7]: [segment#85009, processing_day#85011, count(1)#85023L AS row_count#85018L, approx_count_distinct(customer_id#85005L, 0.05, 0, 0)#85128L AS unique_customers#85019L, sum(events#85015)#85129L AS event_sum#85020L, sum(weighted_amount#85017)#85130 AS weighted_amount_sum#85021, avg(amount#85013)#85131 AS avg_amount#85022]
(17) Exchange
Input [7]: [segment#85009, processing_day#85011, row_count#85018L, unique_customers#85019L, event_sum#85020L, weighted_amount_sum#85021, avg_amount#85022]
Arguments: rangepartitioning(segment#85009 ASC NULLS FIRST, processing_day#85011 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=8018]
(18) Sort
Input [7]: [segment#85009, processing_day#85011, row_count#85018L, unique_customers#85019L, event_sum#85020L, weighted_amount_sum#85021, avg_amount#85022]
Arguments: [segment#85009 ASC NULLS FIRST, processing_day#85011 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#85009, processing_day#85011, row_count#85018L, unique_customers#85019L, event_sum#85020L, weighted_amount_sum#85021, avg_amount#85022]
Arguments: isFinalPlan=true