== 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#82317L]
Arguments: Range (21000000, 22000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#82317L % 250000) AS customer_id#82319L, concat(segment-, cast(cast((id#82317L % 12) as int) as string)) AS segment#82323, cast((id#82317L % 14) as int) AS processing_day#82325, ((cast(((id#82317L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#82327, cast((((id#82317L * 29) % 7) + 1) as int) AS events#82329]
Input [1]: [id#82317L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#82319L, segment#82323, processing_day#82325, amount#82327, events#82329, (amount#82327 * cast(events#82329 as double)) AS weighted_amount#82331]
Input [5]: [customer_id#82319L, segment#82323, processing_day#82325, amount#82327, events#82329]
(4) HashAggregate
Input [6]: [customer_id#82319L, segment#82323, processing_day#82325, amount#82327, events#82329, weighted_amount#82331]
Keys [2]: [segment#82323, processing_day#82325]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#82319L, 0.05, 0, 0), partial_sum(events#82329), partial_sum(weighted_amount#82331), partial_avg(amount#82327)]
Aggregate Attributes [57]: [count#82550L, MS[0]#82338L, MS[1]#82339L, MS[2]#82340L, MS[3]#82341L, MS[4]#82342L, MS[5]#82343L, MS[6]#82344L, MS[7]#82345L, MS[8]#82346L, MS[9]#82347L, MS[10]#82348L, MS[11]#82349L, MS[12]#82350L, MS[13]#82351L, MS[14]#82352L, MS[15]#82353L, MS[16]#82354L, MS[17]#82355L, MS[18]#82356L, MS[19]#82357L, MS[20]#82358L, MS[21]#82359L, MS[22]#82360L, MS[23]#82361L, MS[24]#82362L, MS[25]#82363L, MS[26]#82364L, MS[27]#82365L, MS[28]#82366L, MS[29]#82367L, MS[30]#82368L, MS[31]#82369L, MS[32]#82370L, MS[33]#82371L, MS[34]#82372L, MS[35]#82373L, MS[36]#82374L, MS[37]#82375L, MS[38]#82376L, MS[39]#82377L, MS[40]#82378L, MS[41]#82379L, MS[42]#82380L, MS[43]#82381L, MS[44]#82382L, MS[45]#82383L, MS[46]#82384L, MS[47]#82385L, MS[48]#82386L, MS[49]#82387L, MS[50]#82388L, MS[51]#82389L, sum#82551L, sum#82552, sum#82553, count#82554L]
Results [59]: [segment#82323, processing_day#82325, count#82555L, MS[0]#82390L, MS[1]#82391L, MS[2]#82392L, MS[3]#82393L, MS[4]#82394L, MS[5]#82395L, MS[6]#82396L, MS[7]#82397L, MS[8]#82398L, MS[9]#82399L, MS[10]#82400L, MS[11]#82401L, MS[12]#82402L, MS[13]#82403L, MS[14]#82404L, MS[15]#82405L, MS[16]#82406L, MS[17]#82407L, MS[18]#82408L, MS[19]#82409L, MS[20]#82410L, MS[21]#82411L, MS[22]#82412L, MS[23]#82413L, MS[24]#82414L, MS[25]#82415L, MS[26]#82416L, MS[27]#82417L, MS[28]#82418L, MS[29]#82419L, MS[30]#82420L, MS[31]#82421L, MS[32]#82422L, MS[33]#82423L, MS[34]#82424L, MS[35]#82425L, MS[36]#82426L, MS[37]#82427L, MS[38]#82428L, MS[39]#82429L, MS[40]#82430L, MS[41]#82431L, MS[42]#82432L, MS[43]#82433L, MS[44]#82434L, MS[45]#82435L, MS[46]#82436L, MS[47]#82437L, MS[48]#82438L, MS[49]#82439L, MS[50]#82440L, MS[51]#82441L, sum#82556L, sum#82557, sum#82558, count#82559L]
(5) Exchange
Input [59]: [segment#82323, processing_day#82325, count#82555L, MS[0]#82390L, MS[1]#82391L, MS[2]#82392L, MS[3]#82393L, MS[4]#82394L, MS[5]#82395L, MS[6]#82396L, MS[7]#82397L, MS[8]#82398L, MS[9]#82399L, MS[10]#82400L, MS[11]#82401L, MS[12]#82402L, MS[13]#82403L, MS[14]#82404L, MS[15]#82405L, MS[16]#82406L, MS[17]#82407L, MS[18]#82408L, MS[19]#82409L, MS[20]#82410L, MS[21]#82411L, MS[22]#82412L, MS[23]#82413L, MS[24]#82414L, MS[25]#82415L, MS[26]#82416L, MS[27]#82417L, MS[28]#82418L, MS[29]#82419L, MS[30]#82420L, MS[31]#82421L, MS[32]#82422L, MS[33]#82423L, MS[34]#82424L, MS[35]#82425L, MS[36]#82426L, MS[37]#82427L, MS[38]#82428L, MS[39]#82429L, MS[40]#82430L, MS[41]#82431L, MS[42]#82432L, MS[43]#82433L, MS[44]#82434L, MS[45]#82435L, MS[46]#82436L, MS[47]#82437L, MS[48]#82438L, MS[49]#82439L, MS[50]#82440L, MS[51]#82441L, sum#82556L, sum#82557, sum#82558, count#82559L]
Arguments: hashpartitioning(segment#82323, processing_day#82325, 200), ENSURE_REQUIREMENTS, [plan_id=7780]
(6) ShuffleQueryStage
Output [59]: [segment#82323, processing_day#82325, count#82555L, MS[0]#82390L, MS[1]#82391L, MS[2]#82392L, MS[3]#82393L, MS[4]#82394L, MS[5]#82395L, MS[6]#82396L, MS[7]#82397L, MS[8]#82398L, MS[9]#82399L, MS[10]#82400L, MS[11]#82401L, MS[12]#82402L, MS[13]#82403L, MS[14]#82404L, MS[15]#82405L, MS[16]#82406L, MS[17]#82407L, MS[18]#82408L, MS[19]#82409L, MS[20]#82410L, MS[21]#82411L, MS[22]#82412L, MS[23]#82413L, MS[24]#82414L, MS[25]#82415L, MS[26]#82416L, MS[27]#82417L, MS[28]#82418L, MS[29]#82419L, MS[30]#82420L, MS[31]#82421L, MS[32]#82422L, MS[33]#82423L, MS[34]#82424L, MS[35]#82425L, MS[36]#82426L, MS[37]#82427L, MS[38]#82428L, MS[39]#82429L, MS[40]#82430L, MS[41]#82431L, MS[42]#82432L, MS[43]#82433L, MS[44]#82434L, MS[45]#82435L, MS[46]#82436L, MS[47]#82437L, MS[48]#82438L, MS[49]#82439L, MS[50]#82440L, MS[51]#82441L, sum#82556L, sum#82557, sum#82558, count#82559L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#82323, processing_day#82325, count#82555L, MS[0]#82390L, MS[1]#82391L, MS[2]#82392L, MS[3]#82393L, MS[4]#82394L, MS[5]#82395L, MS[6]#82396L, MS[7]#82397L, MS[8]#82398L, MS[9]#82399L, MS[10]#82400L, MS[11]#82401L, MS[12]#82402L, MS[13]#82403L, MS[14]#82404L, MS[15]#82405L, MS[16]#82406L, MS[17]#82407L, MS[18]#82408L, MS[19]#82409L, MS[20]#82410L, MS[21]#82411L, MS[22]#82412L, MS[23]#82413L, MS[24]#82414L, MS[25]#82415L, MS[26]#82416L, MS[27]#82417L, MS[28]#82418L, MS[29]#82419L, MS[30]#82420L, MS[31]#82421L, MS[32]#82422L, MS[33]#82423L, MS[34]#82424L, MS[35]#82425L, MS[36]#82426L, MS[37]#82427L, MS[38]#82428L, MS[39]#82429L, MS[40]#82430L, MS[41]#82431L, MS[42]#82432L, MS[43]#82433L, MS[44]#82434L, MS[45]#82435L, MS[46]#82436L, MS[47]#82437L, MS[48]#82438L, MS[49]#82439L, MS[50]#82440L, MS[51]#82441L, sum#82556L, sum#82557, sum#82558, count#82559L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#82323, processing_day#82325, count#82555L, MS[0]#82390L, MS[1]#82391L, MS[2]#82392L, MS[3]#82393L, MS[4]#82394L, MS[5]#82395L, MS[6]#82396L, MS[7]#82397L, MS[8]#82398L, MS[9]#82399L, MS[10]#82400L, MS[11]#82401L, MS[12]#82402L, MS[13]#82403L, MS[14]#82404L, MS[15]#82405L, MS[16]#82406L, MS[17]#82407L, MS[18]#82408L, MS[19]#82409L, MS[20]#82410L, MS[21]#82411L, MS[22]#82412L, MS[23]#82413L, MS[24]#82414L, MS[25]#82415L, MS[26]#82416L, MS[27]#82417L, MS[28]#82418L, MS[29]#82419L, MS[30]#82420L, MS[31]#82421L, MS[32]#82422L, MS[33]#82423L, MS[34]#82424L, MS[35]#82425L, MS[36]#82426L, MS[37]#82427L, MS[38]#82428L, MS[39]#82429L, MS[40]#82430L, MS[41]#82431L, MS[42]#82432L, MS[43]#82433L, MS[44]#82434L, MS[45]#82435L, MS[46]#82436L, MS[47]#82437L, MS[48]#82438L, MS[49]#82439L, MS[50]#82440L, MS[51]#82441L, sum#82556L, sum#82557, sum#82558, count#82559L]
Keys [2]: [segment#82323, processing_day#82325]
Functions [5]: [count(1), approx_count_distinct(customer_id#82319L, 0.05, 0, 0), sum(events#82329), sum(weighted_amount#82331), avg(amount#82327)]
Aggregate Attributes [5]: [count(1)#82337L, approx_count_distinct(customer_id#82319L, 0.05, 0, 0)#82442L, sum(events#82329)#82443L, sum(weighted_amount#82331)#82444, avg(amount#82327)#82445]
Results [7]: [segment#82323, processing_day#82325, count(1)#82337L AS row_count#82332L, approx_count_distinct(customer_id#82319L, 0.05, 0, 0)#82442L AS unique_customers#82333L, sum(events#82329)#82443L AS event_sum#82334L, sum(weighted_amount#82331)#82444 AS weighted_amount_sum#82335, avg(amount#82327)#82445 AS avg_amount#82336]
(9) Exchange
Input [7]: [segment#82323, processing_day#82325, row_count#82332L, unique_customers#82333L, event_sum#82334L, weighted_amount_sum#82335, avg_amount#82336]
Arguments: rangepartitioning(segment#82323 ASC NULLS FIRST, processing_day#82325 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=7802]
(10) ShuffleQueryStage
Output [7]: [segment#82323, processing_day#82325, row_count#82332L, unique_customers#82333L, event_sum#82334L, weighted_amount_sum#82335, avg_amount#82336]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#82323, processing_day#82325, row_count#82332L, unique_customers#82333L, event_sum#82334L, weighted_amount_sum#82335, avg_amount#82336]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#82323, processing_day#82325, row_count#82332L, unique_customers#82333L, event_sum#82334L, weighted_amount_sum#82335, avg_amount#82336]
Arguments: [segment#82323 ASC NULLS FIRST, processing_day#82325 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#82323, processing_day#82325, row_count#82332L, unique_customers#82333L, event_sum#82334L, weighted_amount_sum#82335, avg_amount#82336]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#82319L, segment#82323, processing_day#82325, amount#82327, events#82329, weighted_amount#82331]
Keys [2]: [segment#82323, processing_day#82325]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#82319L, 0.05, 0, 0), partial_sum(events#82329), partial_sum(weighted_amount#82331), partial_avg(amount#82327)]
Aggregate Attributes [57]: [count#82550L, MS[0]#82338L, MS[1]#82339L, MS[2]#82340L, MS[3]#82341L, MS[4]#82342L, MS[5]#82343L, MS[6]#82344L, MS[7]#82345L, MS[8]#82346L, MS[9]#82347L, MS[10]#82348L, MS[11]#82349L, MS[12]#82350L, MS[13]#82351L, MS[14]#82352L, MS[15]#82353L, MS[16]#82354L, MS[17]#82355L, MS[18]#82356L, MS[19]#82357L, MS[20]#82358L, MS[21]#82359L, MS[22]#82360L, MS[23]#82361L, MS[24]#82362L, MS[25]#82363L, MS[26]#82364L, MS[27]#82365L, MS[28]#82366L, MS[29]#82367L, MS[30]#82368L, MS[31]#82369L, MS[32]#82370L, MS[33]#82371L, MS[34]#82372L, MS[35]#82373L, MS[36]#82374L, MS[37]#82375L, MS[38]#82376L, MS[39]#82377L, MS[40]#82378L, MS[41]#82379L, MS[42]#82380L, MS[43]#82381L, MS[44]#82382L, MS[45]#82383L, MS[46]#82384L, MS[47]#82385L, MS[48]#82386L, MS[49]#82387L, MS[50]#82388L, MS[51]#82389L, sum#82551L, sum#82552, sum#82553, count#82554L]
Results [59]: [segment#82323, processing_day#82325, count#82555L, MS[0]#82390L, MS[1]#82391L, MS[2]#82392L, MS[3]#82393L, MS[4]#82394L, MS[5]#82395L, MS[6]#82396L, MS[7]#82397L, MS[8]#82398L, MS[9]#82399L, MS[10]#82400L, MS[11]#82401L, MS[12]#82402L, MS[13]#82403L, MS[14]#82404L, MS[15]#82405L, MS[16]#82406L, MS[17]#82407L, MS[18]#82408L, MS[19]#82409L, MS[20]#82410L, MS[21]#82411L, MS[22]#82412L, MS[23]#82413L, MS[24]#82414L, MS[25]#82415L, MS[26]#82416L, MS[27]#82417L, MS[28]#82418L, MS[29]#82419L, MS[30]#82420L, MS[31]#82421L, MS[32]#82422L, MS[33]#82423L, MS[34]#82424L, MS[35]#82425L, MS[36]#82426L, MS[37]#82427L, MS[38]#82428L, MS[39]#82429L, MS[40]#82430L, MS[41]#82431L, MS[42]#82432L, MS[43]#82433L, MS[44]#82434L, MS[45]#82435L, MS[46]#82436L, MS[47]#82437L, MS[48]#82438L, MS[49]#82439L, MS[50]#82440L, MS[51]#82441L, sum#82556L, sum#82557, sum#82558, count#82559L]
(15) Exchange
Input [59]: [segment#82323, processing_day#82325, count#82555L, MS[0]#82390L, MS[1]#82391L, MS[2]#82392L, MS[3]#82393L, MS[4]#82394L, MS[5]#82395L, MS[6]#82396L, MS[7]#82397L, MS[8]#82398L, MS[9]#82399L, MS[10]#82400L, MS[11]#82401L, MS[12]#82402L, MS[13]#82403L, MS[14]#82404L, MS[15]#82405L, MS[16]#82406L, MS[17]#82407L, MS[18]#82408L, MS[19]#82409L, MS[20]#82410L, MS[21]#82411L, MS[22]#82412L, MS[23]#82413L, MS[24]#82414L, MS[25]#82415L, MS[26]#82416L, MS[27]#82417L, MS[28]#82418L, MS[29]#82419L, MS[30]#82420L, MS[31]#82421L, MS[32]#82422L, MS[33]#82423L, MS[34]#82424L, MS[35]#82425L, MS[36]#82426L, MS[37]#82427L, MS[38]#82428L, MS[39]#82429L, MS[40]#82430L, MS[41]#82431L, MS[42]#82432L, MS[43]#82433L, MS[44]#82434L, MS[45]#82435L, MS[46]#82436L, MS[47]#82437L, MS[48]#82438L, MS[49]#82439L, MS[50]#82440L, MS[51]#82441L, sum#82556L, sum#82557, sum#82558, count#82559L]
Arguments: hashpartitioning(segment#82323, processing_day#82325, 200), ENSURE_REQUIREMENTS, [plan_id=7760]
(16) HashAggregate
Input [59]: [segment#82323, processing_day#82325, count#82555L, MS[0]#82390L, MS[1]#82391L, MS[2]#82392L, MS[3]#82393L, MS[4]#82394L, MS[5]#82395L, MS[6]#82396L, MS[7]#82397L, MS[8]#82398L, MS[9]#82399L, MS[10]#82400L, MS[11]#82401L, MS[12]#82402L, MS[13]#82403L, MS[14]#82404L, MS[15]#82405L, MS[16]#82406L, MS[17]#82407L, MS[18]#82408L, MS[19]#82409L, MS[20]#82410L, MS[21]#82411L, MS[22]#82412L, MS[23]#82413L, MS[24]#82414L, MS[25]#82415L, MS[26]#82416L, MS[27]#82417L, MS[28]#82418L, MS[29]#82419L, MS[30]#82420L, MS[31]#82421L, MS[32]#82422L, MS[33]#82423L, MS[34]#82424L, MS[35]#82425L, MS[36]#82426L, MS[37]#82427L, MS[38]#82428L, MS[39]#82429L, MS[40]#82430L, MS[41]#82431L, MS[42]#82432L, MS[43]#82433L, MS[44]#82434L, MS[45]#82435L, MS[46]#82436L, MS[47]#82437L, MS[48]#82438L, MS[49]#82439L, MS[50]#82440L, MS[51]#82441L, sum#82556L, sum#82557, sum#82558, count#82559L]
Keys [2]: [segment#82323, processing_day#82325]
Functions [5]: [count(1), approx_count_distinct(customer_id#82319L, 0.05, 0, 0), sum(events#82329), sum(weighted_amount#82331), avg(amount#82327)]
Aggregate Attributes [5]: [count(1)#82337L, approx_count_distinct(customer_id#82319L, 0.05, 0, 0)#82442L, sum(events#82329)#82443L, sum(weighted_amount#82331)#82444, avg(amount#82327)#82445]
Results [7]: [segment#82323, processing_day#82325, count(1)#82337L AS row_count#82332L, approx_count_distinct(customer_id#82319L, 0.05, 0, 0)#82442L AS unique_customers#82333L, sum(events#82329)#82443L AS event_sum#82334L, sum(weighted_amount#82331)#82444 AS weighted_amount_sum#82335, avg(amount#82327)#82445 AS avg_amount#82336]
(17) Exchange
Input [7]: [segment#82323, processing_day#82325, row_count#82332L, unique_customers#82333L, event_sum#82334L, weighted_amount_sum#82335, avg_amount#82336]
Arguments: rangepartitioning(segment#82323 ASC NULLS FIRST, processing_day#82325 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=7763]
(18) Sort
Input [7]: [segment#82323, processing_day#82325, row_count#82332L, unique_customers#82333L, event_sum#82334L, weighted_amount_sum#82335, avg_amount#82336]
Arguments: [segment#82323 ASC NULLS FIRST, processing_day#82325 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#82323, processing_day#82325, row_count#82332L, unique_customers#82333L, event_sum#82334L, weighted_amount_sum#82335, avg_amount#82336]
Arguments: isFinalPlan=true