== 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#97379L]
Arguments: Range (14000000, 15000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#97379L % 250000) AS customer_id#97381L, concat(segment-, cast(cast((id#97379L % 12) as int) as string)) AS segment#97385, cast((id#97379L % 14) as int) AS processing_day#97387, ((cast(((id#97379L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#97389, cast((((id#97379L * 29) % 7) + 1) as int) AS events#97391]
Input [1]: [id#97379L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#97381L, segment#97385, processing_day#97387, amount#97389, events#97391, (amount#97389 * cast(events#97391 as double)) AS weighted_amount#97393]
Input [5]: [customer_id#97381L, segment#97385, processing_day#97387, amount#97389, events#97391]
(4) HashAggregate
Input [6]: [customer_id#97381L, segment#97385, processing_day#97387, amount#97389, events#97391, weighted_amount#97393]
Keys [2]: [segment#97385, processing_day#97387]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#97381L, 0.05, 0, 0), partial_sum(events#97391), partial_sum(weighted_amount#97393), partial_avg(amount#97389)]
Aggregate Attributes [57]: [count#97612L, MS[0]#97400L, MS[1]#97401L, MS[2]#97402L, MS[3]#97403L, MS[4]#97404L, MS[5]#97405L, MS[6]#97406L, MS[7]#97407L, MS[8]#97408L, MS[9]#97409L, MS[10]#97410L, MS[11]#97411L, MS[12]#97412L, MS[13]#97413L, MS[14]#97414L, MS[15]#97415L, MS[16]#97416L, MS[17]#97417L, MS[18]#97418L, MS[19]#97419L, MS[20]#97420L, MS[21]#97421L, MS[22]#97422L, MS[23]#97423L, MS[24]#97424L, MS[25]#97425L, MS[26]#97426L, MS[27]#97427L, MS[28]#97428L, MS[29]#97429L, MS[30]#97430L, MS[31]#97431L, MS[32]#97432L, MS[33]#97433L, MS[34]#97434L, MS[35]#97435L, MS[36]#97436L, MS[37]#97437L, MS[38]#97438L, MS[39]#97439L, MS[40]#97440L, MS[41]#97441L, MS[42]#97442L, MS[43]#97443L, MS[44]#97444L, MS[45]#97445L, MS[46]#97446L, MS[47]#97447L, MS[48]#97448L, MS[49]#97449L, MS[50]#97450L, MS[51]#97451L, sum#97613L, sum#97614, sum#97615, count#97616L]
Results [59]: [segment#97385, processing_day#97387, count#97617L, MS[0]#97452L, MS[1]#97453L, MS[2]#97454L, MS[3]#97455L, MS[4]#97456L, MS[5]#97457L, MS[6]#97458L, MS[7]#97459L, MS[8]#97460L, MS[9]#97461L, MS[10]#97462L, MS[11]#97463L, MS[12]#97464L, MS[13]#97465L, MS[14]#97466L, MS[15]#97467L, MS[16]#97468L, MS[17]#97469L, MS[18]#97470L, MS[19]#97471L, MS[20]#97472L, MS[21]#97473L, MS[22]#97474L, MS[23]#97475L, MS[24]#97476L, MS[25]#97477L, MS[26]#97478L, MS[27]#97479L, MS[28]#97480L, MS[29]#97481L, MS[30]#97482L, MS[31]#97483L, MS[32]#97484L, MS[33]#97485L, MS[34]#97486L, MS[35]#97487L, MS[36]#97488L, MS[37]#97489L, MS[38]#97490L, MS[39]#97491L, MS[40]#97492L, MS[41]#97493L, MS[42]#97494L, MS[43]#97495L, MS[44]#97496L, MS[45]#97497L, MS[46]#97498L, MS[47]#97499L, MS[48]#97500L, MS[49]#97501L, MS[50]#97502L, MS[51]#97503L, sum#97618L, sum#97619, sum#97620, count#97621L]
(5) Exchange
Input [59]: [segment#97385, processing_day#97387, count#97617L, MS[0]#97452L, MS[1]#97453L, MS[2]#97454L, MS[3]#97455L, MS[4]#97456L, MS[5]#97457L, MS[6]#97458L, MS[7]#97459L, MS[8]#97460L, MS[9]#97461L, MS[10]#97462L, MS[11]#97463L, MS[12]#97464L, MS[13]#97465L, MS[14]#97466L, MS[15]#97467L, MS[16]#97468L, MS[17]#97469L, MS[18]#97470L, MS[19]#97471L, MS[20]#97472L, MS[21]#97473L, MS[22]#97474L, MS[23]#97475L, MS[24]#97476L, MS[25]#97477L, MS[26]#97478L, MS[27]#97479L, MS[28]#97480L, MS[29]#97481L, MS[30]#97482L, MS[31]#97483L, MS[32]#97484L, MS[33]#97485L, MS[34]#97486L, MS[35]#97487L, MS[36]#97488L, MS[37]#97489L, MS[38]#97490L, MS[39]#97491L, MS[40]#97492L, MS[41]#97493L, MS[42]#97494L, MS[43]#97495L, MS[44]#97496L, MS[45]#97497L, MS[46]#97498L, MS[47]#97499L, MS[48]#97500L, MS[49]#97501L, MS[50]#97502L, MS[51]#97503L, sum#97618L, sum#97619, sum#97620, count#97621L]
Arguments: hashpartitioning(segment#97385, processing_day#97387, 200), ENSURE_REQUIREMENTS, [plan_id=9197]
(6) ShuffleQueryStage
Output [59]: [segment#97385, processing_day#97387, count#97617L, MS[0]#97452L, MS[1]#97453L, MS[2]#97454L, MS[3]#97455L, MS[4]#97456L, MS[5]#97457L, MS[6]#97458L, MS[7]#97459L, MS[8]#97460L, MS[9]#97461L, MS[10]#97462L, MS[11]#97463L, MS[12]#97464L, MS[13]#97465L, MS[14]#97466L, MS[15]#97467L, MS[16]#97468L, MS[17]#97469L, MS[18]#97470L, MS[19]#97471L, MS[20]#97472L, MS[21]#97473L, MS[22]#97474L, MS[23]#97475L, MS[24]#97476L, MS[25]#97477L, MS[26]#97478L, MS[27]#97479L, MS[28]#97480L, MS[29]#97481L, MS[30]#97482L, MS[31]#97483L, MS[32]#97484L, MS[33]#97485L, MS[34]#97486L, MS[35]#97487L, MS[36]#97488L, MS[37]#97489L, MS[38]#97490L, MS[39]#97491L, MS[40]#97492L, MS[41]#97493L, MS[42]#97494L, MS[43]#97495L, MS[44]#97496L, MS[45]#97497L, MS[46]#97498L, MS[47]#97499L, MS[48]#97500L, MS[49]#97501L, MS[50]#97502L, MS[51]#97503L, sum#97618L, sum#97619, sum#97620, count#97621L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#97385, processing_day#97387, count#97617L, MS[0]#97452L, MS[1]#97453L, MS[2]#97454L, MS[3]#97455L, MS[4]#97456L, MS[5]#97457L, MS[6]#97458L, MS[7]#97459L, MS[8]#97460L, MS[9]#97461L, MS[10]#97462L, MS[11]#97463L, MS[12]#97464L, MS[13]#97465L, MS[14]#97466L, MS[15]#97467L, MS[16]#97468L, MS[17]#97469L, MS[18]#97470L, MS[19]#97471L, MS[20]#97472L, MS[21]#97473L, MS[22]#97474L, MS[23]#97475L, MS[24]#97476L, MS[25]#97477L, MS[26]#97478L, MS[27]#97479L, MS[28]#97480L, MS[29]#97481L, MS[30]#97482L, MS[31]#97483L, MS[32]#97484L, MS[33]#97485L, MS[34]#97486L, MS[35]#97487L, MS[36]#97488L, MS[37]#97489L, MS[38]#97490L, MS[39]#97491L, MS[40]#97492L, MS[41]#97493L, MS[42]#97494L, MS[43]#97495L, MS[44]#97496L, MS[45]#97497L, MS[46]#97498L, MS[47]#97499L, MS[48]#97500L, MS[49]#97501L, MS[50]#97502L, MS[51]#97503L, sum#97618L, sum#97619, sum#97620, count#97621L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#97385, processing_day#97387, count#97617L, MS[0]#97452L, MS[1]#97453L, MS[2]#97454L, MS[3]#97455L, MS[4]#97456L, MS[5]#97457L, MS[6]#97458L, MS[7]#97459L, MS[8]#97460L, MS[9]#97461L, MS[10]#97462L, MS[11]#97463L, MS[12]#97464L, MS[13]#97465L, MS[14]#97466L, MS[15]#97467L, MS[16]#97468L, MS[17]#97469L, MS[18]#97470L, MS[19]#97471L, MS[20]#97472L, MS[21]#97473L, MS[22]#97474L, MS[23]#97475L, MS[24]#97476L, MS[25]#97477L, MS[26]#97478L, MS[27]#97479L, MS[28]#97480L, MS[29]#97481L, MS[30]#97482L, MS[31]#97483L, MS[32]#97484L, MS[33]#97485L, MS[34]#97486L, MS[35]#97487L, MS[36]#97488L, MS[37]#97489L, MS[38]#97490L, MS[39]#97491L, MS[40]#97492L, MS[41]#97493L, MS[42]#97494L, MS[43]#97495L, MS[44]#97496L, MS[45]#97497L, MS[46]#97498L, MS[47]#97499L, MS[48]#97500L, MS[49]#97501L, MS[50]#97502L, MS[51]#97503L, sum#97618L, sum#97619, sum#97620, count#97621L]
Keys [2]: [segment#97385, processing_day#97387]
Functions [5]: [count(1), approx_count_distinct(customer_id#97381L, 0.05, 0, 0), sum(events#97391), sum(weighted_amount#97393), avg(amount#97389)]
Aggregate Attributes [5]: [count(1)#97399L, approx_count_distinct(customer_id#97381L, 0.05, 0, 0)#97504L, sum(events#97391)#97505L, sum(weighted_amount#97393)#97506, avg(amount#97389)#97507]
Results [7]: [segment#97385, processing_day#97387, count(1)#97399L AS row_count#97394L, approx_count_distinct(customer_id#97381L, 0.05, 0, 0)#97504L AS unique_customers#97395L, sum(events#97391)#97505L AS event_sum#97396L, sum(weighted_amount#97393)#97506 AS weighted_amount_sum#97397, avg(amount#97389)#97507 AS avg_amount#97398]
(9) Exchange
Input [7]: [segment#97385, processing_day#97387, row_count#97394L, unique_customers#97395L, event_sum#97396L, weighted_amount_sum#97397, avg_amount#97398]
Arguments: rangepartitioning(segment#97385 ASC NULLS FIRST, processing_day#97387 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=9219]
(10) ShuffleQueryStage
Output [7]: [segment#97385, processing_day#97387, row_count#97394L, unique_customers#97395L, event_sum#97396L, weighted_amount_sum#97397, avg_amount#97398]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#97385, processing_day#97387, row_count#97394L, unique_customers#97395L, event_sum#97396L, weighted_amount_sum#97397, avg_amount#97398]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#97385, processing_day#97387, row_count#97394L, unique_customers#97395L, event_sum#97396L, weighted_amount_sum#97397, avg_amount#97398]
Arguments: [segment#97385 ASC NULLS FIRST, processing_day#97387 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#97385, processing_day#97387, row_count#97394L, unique_customers#97395L, event_sum#97396L, weighted_amount_sum#97397, avg_amount#97398]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#97381L, segment#97385, processing_day#97387, amount#97389, events#97391, weighted_amount#97393]
Keys [2]: [segment#97385, processing_day#97387]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#97381L, 0.05, 0, 0), partial_sum(events#97391), partial_sum(weighted_amount#97393), partial_avg(amount#97389)]
Aggregate Attributes [57]: [count#97612L, MS[0]#97400L, MS[1]#97401L, MS[2]#97402L, MS[3]#97403L, MS[4]#97404L, MS[5]#97405L, MS[6]#97406L, MS[7]#97407L, MS[8]#97408L, MS[9]#97409L, MS[10]#97410L, MS[11]#97411L, MS[12]#97412L, MS[13]#97413L, MS[14]#97414L, MS[15]#97415L, MS[16]#97416L, MS[17]#97417L, MS[18]#97418L, MS[19]#97419L, MS[20]#97420L, MS[21]#97421L, MS[22]#97422L, MS[23]#97423L, MS[24]#97424L, MS[25]#97425L, MS[26]#97426L, MS[27]#97427L, MS[28]#97428L, MS[29]#97429L, MS[30]#97430L, MS[31]#97431L, MS[32]#97432L, MS[33]#97433L, MS[34]#97434L, MS[35]#97435L, MS[36]#97436L, MS[37]#97437L, MS[38]#97438L, MS[39]#97439L, MS[40]#97440L, MS[41]#97441L, MS[42]#97442L, MS[43]#97443L, MS[44]#97444L, MS[45]#97445L, MS[46]#97446L, MS[47]#97447L, MS[48]#97448L, MS[49]#97449L, MS[50]#97450L, MS[51]#97451L, sum#97613L, sum#97614, sum#97615, count#97616L]
Results [59]: [segment#97385, processing_day#97387, count#97617L, MS[0]#97452L, MS[1]#97453L, MS[2]#97454L, MS[3]#97455L, MS[4]#97456L, MS[5]#97457L, MS[6]#97458L, MS[7]#97459L, MS[8]#97460L, MS[9]#97461L, MS[10]#97462L, MS[11]#97463L, MS[12]#97464L, MS[13]#97465L, MS[14]#97466L, MS[15]#97467L, MS[16]#97468L, MS[17]#97469L, MS[18]#97470L, MS[19]#97471L, MS[20]#97472L, MS[21]#97473L, MS[22]#97474L, MS[23]#97475L, MS[24]#97476L, MS[25]#97477L, MS[26]#97478L, MS[27]#97479L, MS[28]#97480L, MS[29]#97481L, MS[30]#97482L, MS[31]#97483L, MS[32]#97484L, MS[33]#97485L, MS[34]#97486L, MS[35]#97487L, MS[36]#97488L, MS[37]#97489L, MS[38]#97490L, MS[39]#97491L, MS[40]#97492L, MS[41]#97493L, MS[42]#97494L, MS[43]#97495L, MS[44]#97496L, MS[45]#97497L, MS[46]#97498L, MS[47]#97499L, MS[48]#97500L, MS[49]#97501L, MS[50]#97502L, MS[51]#97503L, sum#97618L, sum#97619, sum#97620, count#97621L]
(15) Exchange
Input [59]: [segment#97385, processing_day#97387, count#97617L, MS[0]#97452L, MS[1]#97453L, MS[2]#97454L, MS[3]#97455L, MS[4]#97456L, MS[5]#97457L, MS[6]#97458L, MS[7]#97459L, MS[8]#97460L, MS[9]#97461L, MS[10]#97462L, MS[11]#97463L, MS[12]#97464L, MS[13]#97465L, MS[14]#97466L, MS[15]#97467L, MS[16]#97468L, MS[17]#97469L, MS[18]#97470L, MS[19]#97471L, MS[20]#97472L, MS[21]#97473L, MS[22]#97474L, MS[23]#97475L, MS[24]#97476L, MS[25]#97477L, MS[26]#97478L, MS[27]#97479L, MS[28]#97480L, MS[29]#97481L, MS[30]#97482L, MS[31]#97483L, MS[32]#97484L, MS[33]#97485L, MS[34]#97486L, MS[35]#97487L, MS[36]#97488L, MS[37]#97489L, MS[38]#97490L, MS[39]#97491L, MS[40]#97492L, MS[41]#97493L, MS[42]#97494L, MS[43]#97495L, MS[44]#97496L, MS[45]#97497L, MS[46]#97498L, MS[47]#97499L, MS[48]#97500L, MS[49]#97501L, MS[50]#97502L, MS[51]#97503L, sum#97618L, sum#97619, sum#97620, count#97621L]
Arguments: hashpartitioning(segment#97385, processing_day#97387, 200), ENSURE_REQUIREMENTS, [plan_id=9177]
(16) HashAggregate
Input [59]: [segment#97385, processing_day#97387, count#97617L, MS[0]#97452L, MS[1]#97453L, MS[2]#97454L, MS[3]#97455L, MS[4]#97456L, MS[5]#97457L, MS[6]#97458L, MS[7]#97459L, MS[8]#97460L, MS[9]#97461L, MS[10]#97462L, MS[11]#97463L, MS[12]#97464L, MS[13]#97465L, MS[14]#97466L, MS[15]#97467L, MS[16]#97468L, MS[17]#97469L, MS[18]#97470L, MS[19]#97471L, MS[20]#97472L, MS[21]#97473L, MS[22]#97474L, MS[23]#97475L, MS[24]#97476L, MS[25]#97477L, MS[26]#97478L, MS[27]#97479L, MS[28]#97480L, MS[29]#97481L, MS[30]#97482L, MS[31]#97483L, MS[32]#97484L, MS[33]#97485L, MS[34]#97486L, MS[35]#97487L, MS[36]#97488L, MS[37]#97489L, MS[38]#97490L, MS[39]#97491L, MS[40]#97492L, MS[41]#97493L, MS[42]#97494L, MS[43]#97495L, MS[44]#97496L, MS[45]#97497L, MS[46]#97498L, MS[47]#97499L, MS[48]#97500L, MS[49]#97501L, MS[50]#97502L, MS[51]#97503L, sum#97618L, sum#97619, sum#97620, count#97621L]
Keys [2]: [segment#97385, processing_day#97387]
Functions [5]: [count(1), approx_count_distinct(customer_id#97381L, 0.05, 0, 0), sum(events#97391), sum(weighted_amount#97393), avg(amount#97389)]
Aggregate Attributes [5]: [count(1)#97399L, approx_count_distinct(customer_id#97381L, 0.05, 0, 0)#97504L, sum(events#97391)#97505L, sum(weighted_amount#97393)#97506, avg(amount#97389)#97507]
Results [7]: [segment#97385, processing_day#97387, count(1)#97399L AS row_count#97394L, approx_count_distinct(customer_id#97381L, 0.05, 0, 0)#97504L AS unique_customers#97395L, sum(events#97391)#97505L AS event_sum#97396L, sum(weighted_amount#97393)#97506 AS weighted_amount_sum#97397, avg(amount#97389)#97507 AS avg_amount#97398]
(17) Exchange
Input [7]: [segment#97385, processing_day#97387, row_count#97394L, unique_customers#97395L, event_sum#97396L, weighted_amount_sum#97397, avg_amount#97398]
Arguments: rangepartitioning(segment#97385 ASC NULLS FIRST, processing_day#97387 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=9180]
(18) Sort
Input [7]: [segment#97385, processing_day#97387, row_count#97394L, unique_customers#97395L, event_sum#97396L, weighted_amount_sum#97397, avg_amount#97398]
Arguments: [segment#97385 ASC NULLS FIRST, processing_day#97387 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#97385, processing_day#97387, row_count#97394L, unique_customers#97395L, event_sum#97396L, weighted_amount_sum#97397, avg_amount#97398]
Arguments: isFinalPlan=true