== 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#35397L]
Arguments: Range (16000000, 17000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#35397L % 250000) AS customer_id#35399L, concat(segment-, cast(cast((id#35397L % 12) as int) as string)) AS segment#35403, cast((id#35397L % 14) as int) AS processing_day#35405, ((cast(((id#35397L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#35407, cast((((id#35397L * 29) % 7) + 1) as int) AS events#35409]
Input [1]: [id#35397L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#35399L, segment#35403, processing_day#35405, amount#35407, events#35409, (amount#35407 * cast(events#35409 as double)) AS weighted_amount#35411]
Input [5]: [customer_id#35399L, segment#35403, processing_day#35405, amount#35407, events#35409]
(4) HashAggregate
Input [6]: [customer_id#35399L, segment#35403, processing_day#35405, amount#35407, events#35409, weighted_amount#35411]
Keys [2]: [segment#35403, processing_day#35405]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#35399L, 0.05, 0, 0), partial_sum(events#35409), partial_sum(weighted_amount#35411), partial_avg(amount#35407)]
Aggregate Attributes [57]: [count#35630L, MS[0]#35418L, MS[1]#35419L, MS[2]#35420L, MS[3]#35421L, MS[4]#35422L, MS[5]#35423L, MS[6]#35424L, MS[7]#35425L, MS[8]#35426L, MS[9]#35427L, MS[10]#35428L, MS[11]#35429L, MS[12]#35430L, MS[13]#35431L, MS[14]#35432L, MS[15]#35433L, MS[16]#35434L, MS[17]#35435L, MS[18]#35436L, MS[19]#35437L, MS[20]#35438L, MS[21]#35439L, MS[22]#35440L, MS[23]#35441L, MS[24]#35442L, MS[25]#35443L, MS[26]#35444L, MS[27]#35445L, MS[28]#35446L, MS[29]#35447L, MS[30]#35448L, MS[31]#35449L, MS[32]#35450L, MS[33]#35451L, MS[34]#35452L, MS[35]#35453L, MS[36]#35454L, MS[37]#35455L, MS[38]#35456L, MS[39]#35457L, MS[40]#35458L, MS[41]#35459L, MS[42]#35460L, MS[43]#35461L, MS[44]#35462L, MS[45]#35463L, MS[46]#35464L, MS[47]#35465L, MS[48]#35466L, MS[49]#35467L, MS[50]#35468L, MS[51]#35469L, sum#35631L, sum#35632, sum#35633, count#35634L]
Results [59]: [segment#35403, processing_day#35405, count#35635L, MS[0]#35470L, MS[1]#35471L, MS[2]#35472L, MS[3]#35473L, MS[4]#35474L, MS[5]#35475L, MS[6]#35476L, MS[7]#35477L, MS[8]#35478L, MS[9]#35479L, MS[10]#35480L, MS[11]#35481L, MS[12]#35482L, MS[13]#35483L, MS[14]#35484L, MS[15]#35485L, MS[16]#35486L, MS[17]#35487L, MS[18]#35488L, MS[19]#35489L, MS[20]#35490L, MS[21]#35491L, MS[22]#35492L, MS[23]#35493L, MS[24]#35494L, MS[25]#35495L, MS[26]#35496L, MS[27]#35497L, MS[28]#35498L, MS[29]#35499L, MS[30]#35500L, MS[31]#35501L, MS[32]#35502L, MS[33]#35503L, MS[34]#35504L, MS[35]#35505L, MS[36]#35506L, MS[37]#35507L, MS[38]#35508L, MS[39]#35509L, MS[40]#35510L, MS[41]#35511L, MS[42]#35512L, MS[43]#35513L, MS[44]#35514L, MS[45]#35515L, MS[46]#35516L, MS[47]#35517L, MS[48]#35518L, MS[49]#35519L, MS[50]#35520L, MS[51]#35521L, sum#35636L, sum#35637, sum#35638, count#35639L]
(5) Exchange
Input [59]: [segment#35403, processing_day#35405, count#35635L, MS[0]#35470L, MS[1]#35471L, MS[2]#35472L, MS[3]#35473L, MS[4]#35474L, MS[5]#35475L, MS[6]#35476L, MS[7]#35477L, MS[8]#35478L, MS[9]#35479L, MS[10]#35480L, MS[11]#35481L, MS[12]#35482L, MS[13]#35483L, MS[14]#35484L, MS[15]#35485L, MS[16]#35486L, MS[17]#35487L, MS[18]#35488L, MS[19]#35489L, MS[20]#35490L, MS[21]#35491L, MS[22]#35492L, MS[23]#35493L, MS[24]#35494L, MS[25]#35495L, MS[26]#35496L, MS[27]#35497L, MS[28]#35498L, MS[29]#35499L, MS[30]#35500L, MS[31]#35501L, MS[32]#35502L, MS[33]#35503L, MS[34]#35504L, MS[35]#35505L, MS[36]#35506L, MS[37]#35507L, MS[38]#35508L, MS[39]#35509L, MS[40]#35510L, MS[41]#35511L, MS[42]#35512L, MS[43]#35513L, MS[44]#35514L, MS[45]#35515L, MS[46]#35516L, MS[47]#35517L, MS[48]#35518L, MS[49]#35519L, MS[50]#35520L, MS[51]#35521L, sum#35636L, sum#35637, sum#35638, count#35639L]
Arguments: hashpartitioning(segment#35403, processing_day#35405, 200), ENSURE_REQUIREMENTS, [plan_id=3369]
(6) ShuffleQueryStage
Output [59]: [segment#35403, processing_day#35405, count#35635L, MS[0]#35470L, MS[1]#35471L, MS[2]#35472L, MS[3]#35473L, MS[4]#35474L, MS[5]#35475L, MS[6]#35476L, MS[7]#35477L, MS[8]#35478L, MS[9]#35479L, MS[10]#35480L, MS[11]#35481L, MS[12]#35482L, MS[13]#35483L, MS[14]#35484L, MS[15]#35485L, MS[16]#35486L, MS[17]#35487L, MS[18]#35488L, MS[19]#35489L, MS[20]#35490L, MS[21]#35491L, MS[22]#35492L, MS[23]#35493L, MS[24]#35494L, MS[25]#35495L, MS[26]#35496L, MS[27]#35497L, MS[28]#35498L, MS[29]#35499L, MS[30]#35500L, MS[31]#35501L, MS[32]#35502L, MS[33]#35503L, MS[34]#35504L, MS[35]#35505L, MS[36]#35506L, MS[37]#35507L, MS[38]#35508L, MS[39]#35509L, MS[40]#35510L, MS[41]#35511L, MS[42]#35512L, MS[43]#35513L, MS[44]#35514L, MS[45]#35515L, MS[46]#35516L, MS[47]#35517L, MS[48]#35518L, MS[49]#35519L, MS[50]#35520L, MS[51]#35521L, sum#35636L, sum#35637, sum#35638, count#35639L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#35403, processing_day#35405, count#35635L, MS[0]#35470L, MS[1]#35471L, MS[2]#35472L, MS[3]#35473L, MS[4]#35474L, MS[5]#35475L, MS[6]#35476L, MS[7]#35477L, MS[8]#35478L, MS[9]#35479L, MS[10]#35480L, MS[11]#35481L, MS[12]#35482L, MS[13]#35483L, MS[14]#35484L, MS[15]#35485L, MS[16]#35486L, MS[17]#35487L, MS[18]#35488L, MS[19]#35489L, MS[20]#35490L, MS[21]#35491L, MS[22]#35492L, MS[23]#35493L, MS[24]#35494L, MS[25]#35495L, MS[26]#35496L, MS[27]#35497L, MS[28]#35498L, MS[29]#35499L, MS[30]#35500L, MS[31]#35501L, MS[32]#35502L, MS[33]#35503L, MS[34]#35504L, MS[35]#35505L, MS[36]#35506L, MS[37]#35507L, MS[38]#35508L, MS[39]#35509L, MS[40]#35510L, MS[41]#35511L, MS[42]#35512L, MS[43]#35513L, MS[44]#35514L, MS[45]#35515L, MS[46]#35516L, MS[47]#35517L, MS[48]#35518L, MS[49]#35519L, MS[50]#35520L, MS[51]#35521L, sum#35636L, sum#35637, sum#35638, count#35639L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#35403, processing_day#35405, count#35635L, MS[0]#35470L, MS[1]#35471L, MS[2]#35472L, MS[3]#35473L, MS[4]#35474L, MS[5]#35475L, MS[6]#35476L, MS[7]#35477L, MS[8]#35478L, MS[9]#35479L, MS[10]#35480L, MS[11]#35481L, MS[12]#35482L, MS[13]#35483L, MS[14]#35484L, MS[15]#35485L, MS[16]#35486L, MS[17]#35487L, MS[18]#35488L, MS[19]#35489L, MS[20]#35490L, MS[21]#35491L, MS[22]#35492L, MS[23]#35493L, MS[24]#35494L, MS[25]#35495L, MS[26]#35496L, MS[27]#35497L, MS[28]#35498L, MS[29]#35499L, MS[30]#35500L, MS[31]#35501L, MS[32]#35502L, MS[33]#35503L, MS[34]#35504L, MS[35]#35505L, MS[36]#35506L, MS[37]#35507L, MS[38]#35508L, MS[39]#35509L, MS[40]#35510L, MS[41]#35511L, MS[42]#35512L, MS[43]#35513L, MS[44]#35514L, MS[45]#35515L, MS[46]#35516L, MS[47]#35517L, MS[48]#35518L, MS[49]#35519L, MS[50]#35520L, MS[51]#35521L, sum#35636L, sum#35637, sum#35638, count#35639L]
Keys [2]: [segment#35403, processing_day#35405]
Functions [5]: [count(1), approx_count_distinct(customer_id#35399L, 0.05, 0, 0), sum(events#35409), sum(weighted_amount#35411), avg(amount#35407)]
Aggregate Attributes [5]: [count(1)#35417L, approx_count_distinct(customer_id#35399L, 0.05, 0, 0)#35522L, sum(events#35409)#35523L, sum(weighted_amount#35411)#35524, avg(amount#35407)#35525]
Results [7]: [segment#35403, processing_day#35405, count(1)#35417L AS row_count#35412L, approx_count_distinct(customer_id#35399L, 0.05, 0, 0)#35522L AS unique_customers#35413L, sum(events#35409)#35523L AS event_sum#35414L, sum(weighted_amount#35411)#35524 AS weighted_amount_sum#35415, avg(amount#35407)#35525 AS avg_amount#35416]
(9) Exchange
Input [7]: [segment#35403, processing_day#35405, row_count#35412L, unique_customers#35413L, event_sum#35414L, weighted_amount_sum#35415, avg_amount#35416]
Arguments: rangepartitioning(segment#35403 ASC NULLS FIRST, processing_day#35405 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=3391]
(10) ShuffleQueryStage
Output [7]: [segment#35403, processing_day#35405, row_count#35412L, unique_customers#35413L, event_sum#35414L, weighted_amount_sum#35415, avg_amount#35416]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#35403, processing_day#35405, row_count#35412L, unique_customers#35413L, event_sum#35414L, weighted_amount_sum#35415, avg_amount#35416]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#35403, processing_day#35405, row_count#35412L, unique_customers#35413L, event_sum#35414L, weighted_amount_sum#35415, avg_amount#35416]
Arguments: [segment#35403 ASC NULLS FIRST, processing_day#35405 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#35403, processing_day#35405, row_count#35412L, unique_customers#35413L, event_sum#35414L, weighted_amount_sum#35415, avg_amount#35416]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#35399L, segment#35403, processing_day#35405, amount#35407, events#35409, weighted_amount#35411]
Keys [2]: [segment#35403, processing_day#35405]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#35399L, 0.05, 0, 0), partial_sum(events#35409), partial_sum(weighted_amount#35411), partial_avg(amount#35407)]
Aggregate Attributes [57]: [count#35630L, MS[0]#35418L, MS[1]#35419L, MS[2]#35420L, MS[3]#35421L, MS[4]#35422L, MS[5]#35423L, MS[6]#35424L, MS[7]#35425L, MS[8]#35426L, MS[9]#35427L, MS[10]#35428L, MS[11]#35429L, MS[12]#35430L, MS[13]#35431L, MS[14]#35432L, MS[15]#35433L, MS[16]#35434L, MS[17]#35435L, MS[18]#35436L, MS[19]#35437L, MS[20]#35438L, MS[21]#35439L, MS[22]#35440L, MS[23]#35441L, MS[24]#35442L, MS[25]#35443L, MS[26]#35444L, MS[27]#35445L, MS[28]#35446L, MS[29]#35447L, MS[30]#35448L, MS[31]#35449L, MS[32]#35450L, MS[33]#35451L, MS[34]#35452L, MS[35]#35453L, MS[36]#35454L, MS[37]#35455L, MS[38]#35456L, MS[39]#35457L, MS[40]#35458L, MS[41]#35459L, MS[42]#35460L, MS[43]#35461L, MS[44]#35462L, MS[45]#35463L, MS[46]#35464L, MS[47]#35465L, MS[48]#35466L, MS[49]#35467L, MS[50]#35468L, MS[51]#35469L, sum#35631L, sum#35632, sum#35633, count#35634L]
Results [59]: [segment#35403, processing_day#35405, count#35635L, MS[0]#35470L, MS[1]#35471L, MS[2]#35472L, MS[3]#35473L, MS[4]#35474L, MS[5]#35475L, MS[6]#35476L, MS[7]#35477L, MS[8]#35478L, MS[9]#35479L, MS[10]#35480L, MS[11]#35481L, MS[12]#35482L, MS[13]#35483L, MS[14]#35484L, MS[15]#35485L, MS[16]#35486L, MS[17]#35487L, MS[18]#35488L, MS[19]#35489L, MS[20]#35490L, MS[21]#35491L, MS[22]#35492L, MS[23]#35493L, MS[24]#35494L, MS[25]#35495L, MS[26]#35496L, MS[27]#35497L, MS[28]#35498L, MS[29]#35499L, MS[30]#35500L, MS[31]#35501L, MS[32]#35502L, MS[33]#35503L, MS[34]#35504L, MS[35]#35505L, MS[36]#35506L, MS[37]#35507L, MS[38]#35508L, MS[39]#35509L, MS[40]#35510L, MS[41]#35511L, MS[42]#35512L, MS[43]#35513L, MS[44]#35514L, MS[45]#35515L, MS[46]#35516L, MS[47]#35517L, MS[48]#35518L, MS[49]#35519L, MS[50]#35520L, MS[51]#35521L, sum#35636L, sum#35637, sum#35638, count#35639L]
(15) Exchange
Input [59]: [segment#35403, processing_day#35405, count#35635L, MS[0]#35470L, MS[1]#35471L, MS[2]#35472L, MS[3]#35473L, MS[4]#35474L, MS[5]#35475L, MS[6]#35476L, MS[7]#35477L, MS[8]#35478L, MS[9]#35479L, MS[10]#35480L, MS[11]#35481L, MS[12]#35482L, MS[13]#35483L, MS[14]#35484L, MS[15]#35485L, MS[16]#35486L, MS[17]#35487L, MS[18]#35488L, MS[19]#35489L, MS[20]#35490L, MS[21]#35491L, MS[22]#35492L, MS[23]#35493L, MS[24]#35494L, MS[25]#35495L, MS[26]#35496L, MS[27]#35497L, MS[28]#35498L, MS[29]#35499L, MS[30]#35500L, MS[31]#35501L, MS[32]#35502L, MS[33]#35503L, MS[34]#35504L, MS[35]#35505L, MS[36]#35506L, MS[37]#35507L, MS[38]#35508L, MS[39]#35509L, MS[40]#35510L, MS[41]#35511L, MS[42]#35512L, MS[43]#35513L, MS[44]#35514L, MS[45]#35515L, MS[46]#35516L, MS[47]#35517L, MS[48]#35518L, MS[49]#35519L, MS[50]#35520L, MS[51]#35521L, sum#35636L, sum#35637, sum#35638, count#35639L]
Arguments: hashpartitioning(segment#35403, processing_day#35405, 200), ENSURE_REQUIREMENTS, [plan_id=3349]
(16) HashAggregate
Input [59]: [segment#35403, processing_day#35405, count#35635L, MS[0]#35470L, MS[1]#35471L, MS[2]#35472L, MS[3]#35473L, MS[4]#35474L, MS[5]#35475L, MS[6]#35476L, MS[7]#35477L, MS[8]#35478L, MS[9]#35479L, MS[10]#35480L, MS[11]#35481L, MS[12]#35482L, MS[13]#35483L, MS[14]#35484L, MS[15]#35485L, MS[16]#35486L, MS[17]#35487L, MS[18]#35488L, MS[19]#35489L, MS[20]#35490L, MS[21]#35491L, MS[22]#35492L, MS[23]#35493L, MS[24]#35494L, MS[25]#35495L, MS[26]#35496L, MS[27]#35497L, MS[28]#35498L, MS[29]#35499L, MS[30]#35500L, MS[31]#35501L, MS[32]#35502L, MS[33]#35503L, MS[34]#35504L, MS[35]#35505L, MS[36]#35506L, MS[37]#35507L, MS[38]#35508L, MS[39]#35509L, MS[40]#35510L, MS[41]#35511L, MS[42]#35512L, MS[43]#35513L, MS[44]#35514L, MS[45]#35515L, MS[46]#35516L, MS[47]#35517L, MS[48]#35518L, MS[49]#35519L, MS[50]#35520L, MS[51]#35521L, sum#35636L, sum#35637, sum#35638, count#35639L]
Keys [2]: [segment#35403, processing_day#35405]
Functions [5]: [count(1), approx_count_distinct(customer_id#35399L, 0.05, 0, 0), sum(events#35409), sum(weighted_amount#35411), avg(amount#35407)]
Aggregate Attributes [5]: [count(1)#35417L, approx_count_distinct(customer_id#35399L, 0.05, 0, 0)#35522L, sum(events#35409)#35523L, sum(weighted_amount#35411)#35524, avg(amount#35407)#35525]
Results [7]: [segment#35403, processing_day#35405, count(1)#35417L AS row_count#35412L, approx_count_distinct(customer_id#35399L, 0.05, 0, 0)#35522L AS unique_customers#35413L, sum(events#35409)#35523L AS event_sum#35414L, sum(weighted_amount#35411)#35524 AS weighted_amount_sum#35415, avg(amount#35407)#35525 AS avg_amount#35416]
(17) Exchange
Input [7]: [segment#35403, processing_day#35405, row_count#35412L, unique_customers#35413L, event_sum#35414L, weighted_amount_sum#35415, avg_amount#35416]
Arguments: rangepartitioning(segment#35403 ASC NULLS FIRST, processing_day#35405 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=3352]
(18) Sort
Input [7]: [segment#35403, processing_day#35405, row_count#35412L, unique_customers#35413L, event_sum#35414L, weighted_amount_sum#35415, avg_amount#35416]
Arguments: [segment#35403 ASC NULLS FIRST, processing_day#35405 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#35403, processing_day#35405, row_count#35412L, unique_customers#35413L, event_sum#35414L, weighted_amount_sum#35415, avg_amount#35416]
Arguments: isFinalPlan=true