== 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#49575L]
Arguments: Range (8000000, 9000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#49575L % 250000) AS customer_id#49577L, concat(segment-, cast(cast((id#49575L % 12) as int) as string)) AS segment#49581, cast((id#49575L % 14) as int) AS processing_day#49583, ((cast(((id#49575L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#49585, cast((((id#49575L * 29) % 7) + 1) as int) AS events#49587]
Input [1]: [id#49575L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#49577L, segment#49581, processing_day#49583, amount#49585, events#49587, (amount#49585 * cast(events#49587 as double)) AS weighted_amount#49589]
Input [5]: [customer_id#49577L, segment#49581, processing_day#49583, amount#49585, events#49587]
(4) HashAggregate
Input [6]: [customer_id#49577L, segment#49581, processing_day#49583, amount#49585, events#49587, weighted_amount#49589]
Keys [2]: [segment#49581, processing_day#49583]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#49577L, 0.05, 0, 0), partial_sum(events#49587), partial_sum(weighted_amount#49589), partial_avg(amount#49585)]
Aggregate Attributes [57]: [count#49808L, MS[0]#49596L, MS[1]#49597L, MS[2]#49598L, MS[3]#49599L, MS[4]#49600L, MS[5]#49601L, MS[6]#49602L, MS[7]#49603L, MS[8]#49604L, MS[9]#49605L, MS[10]#49606L, MS[11]#49607L, MS[12]#49608L, MS[13]#49609L, MS[14]#49610L, MS[15]#49611L, MS[16]#49612L, MS[17]#49613L, MS[18]#49614L, MS[19]#49615L, MS[20]#49616L, MS[21]#49617L, MS[22]#49618L, MS[23]#49619L, MS[24]#49620L, MS[25]#49621L, MS[26]#49622L, MS[27]#49623L, MS[28]#49624L, MS[29]#49625L, MS[30]#49626L, MS[31]#49627L, MS[32]#49628L, MS[33]#49629L, MS[34]#49630L, MS[35]#49631L, MS[36]#49632L, MS[37]#49633L, MS[38]#49634L, MS[39]#49635L, MS[40]#49636L, MS[41]#49637L, MS[42]#49638L, MS[43]#49639L, MS[44]#49640L, MS[45]#49641L, MS[46]#49642L, MS[47]#49643L, MS[48]#49644L, MS[49]#49645L, MS[50]#49646L, MS[51]#49647L, sum#49809L, sum#49810, sum#49811, count#49812L]
Results [59]: [segment#49581, processing_day#49583, count#49813L, MS[0]#49648L, MS[1]#49649L, MS[2]#49650L, MS[3]#49651L, MS[4]#49652L, MS[5]#49653L, MS[6]#49654L, MS[7]#49655L, MS[8]#49656L, MS[9]#49657L, MS[10]#49658L, MS[11]#49659L, MS[12]#49660L, MS[13]#49661L, MS[14]#49662L, MS[15]#49663L, MS[16]#49664L, MS[17]#49665L, MS[18]#49666L, MS[19]#49667L, MS[20]#49668L, MS[21]#49669L, MS[22]#49670L, MS[23]#49671L, MS[24]#49672L, MS[25]#49673L, MS[26]#49674L, MS[27]#49675L, MS[28]#49676L, MS[29]#49677L, MS[30]#49678L, MS[31]#49679L, MS[32]#49680L, MS[33]#49681L, MS[34]#49682L, MS[35]#49683L, MS[36]#49684L, MS[37]#49685L, MS[38]#49686L, MS[39]#49687L, MS[40]#49688L, MS[41]#49689L, MS[42]#49690L, MS[43]#49691L, MS[44]#49692L, MS[45]#49693L, MS[46]#49694L, MS[47]#49695L, MS[48]#49696L, MS[49]#49697L, MS[50]#49698L, MS[51]#49699L, sum#49814L, sum#49815, sum#49816, count#49817L]
(5) Exchange
Input [59]: [segment#49581, processing_day#49583, count#49813L, MS[0]#49648L, MS[1]#49649L, MS[2]#49650L, MS[3]#49651L, MS[4]#49652L, MS[5]#49653L, MS[6]#49654L, MS[7]#49655L, MS[8]#49656L, MS[9]#49657L, MS[10]#49658L, MS[11]#49659L, MS[12]#49660L, MS[13]#49661L, MS[14]#49662L, MS[15]#49663L, MS[16]#49664L, MS[17]#49665L, MS[18]#49666L, MS[19]#49667L, MS[20]#49668L, MS[21]#49669L, MS[22]#49670L, MS[23]#49671L, MS[24]#49672L, MS[25]#49673L, MS[26]#49674L, MS[27]#49675L, MS[28]#49676L, MS[29]#49677L, MS[30]#49678L, MS[31]#49679L, MS[32]#49680L, MS[33]#49681L, MS[34]#49682L, MS[35]#49683L, MS[36]#49684L, MS[37]#49685L, MS[38]#49686L, MS[39]#49687L, MS[40]#49688L, MS[41]#49689L, MS[42]#49690L, MS[43]#49691L, MS[44]#49692L, MS[45]#49693L, MS[46]#49694L, MS[47]#49695L, MS[48]#49696L, MS[49]#49697L, MS[50]#49698L, MS[51]#49699L, sum#49814L, sum#49815, sum#49816, count#49817L]
Arguments: hashpartitioning(segment#49581, processing_day#49583, 200), ENSURE_REQUIREMENTS, [plan_id=4703]
(6) ShuffleQueryStage
Output [59]: [segment#49581, processing_day#49583, count#49813L, MS[0]#49648L, MS[1]#49649L, MS[2]#49650L, MS[3]#49651L, MS[4]#49652L, MS[5]#49653L, MS[6]#49654L, MS[7]#49655L, MS[8]#49656L, MS[9]#49657L, MS[10]#49658L, MS[11]#49659L, MS[12]#49660L, MS[13]#49661L, MS[14]#49662L, MS[15]#49663L, MS[16]#49664L, MS[17]#49665L, MS[18]#49666L, MS[19]#49667L, MS[20]#49668L, MS[21]#49669L, MS[22]#49670L, MS[23]#49671L, MS[24]#49672L, MS[25]#49673L, MS[26]#49674L, MS[27]#49675L, MS[28]#49676L, MS[29]#49677L, MS[30]#49678L, MS[31]#49679L, MS[32]#49680L, MS[33]#49681L, MS[34]#49682L, MS[35]#49683L, MS[36]#49684L, MS[37]#49685L, MS[38]#49686L, MS[39]#49687L, MS[40]#49688L, MS[41]#49689L, MS[42]#49690L, MS[43]#49691L, MS[44]#49692L, MS[45]#49693L, MS[46]#49694L, MS[47]#49695L, MS[48]#49696L, MS[49]#49697L, MS[50]#49698L, MS[51]#49699L, sum#49814L, sum#49815, sum#49816, count#49817L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#49581, processing_day#49583, count#49813L, MS[0]#49648L, MS[1]#49649L, MS[2]#49650L, MS[3]#49651L, MS[4]#49652L, MS[5]#49653L, MS[6]#49654L, MS[7]#49655L, MS[8]#49656L, MS[9]#49657L, MS[10]#49658L, MS[11]#49659L, MS[12]#49660L, MS[13]#49661L, MS[14]#49662L, MS[15]#49663L, MS[16]#49664L, MS[17]#49665L, MS[18]#49666L, MS[19]#49667L, MS[20]#49668L, MS[21]#49669L, MS[22]#49670L, MS[23]#49671L, MS[24]#49672L, MS[25]#49673L, MS[26]#49674L, MS[27]#49675L, MS[28]#49676L, MS[29]#49677L, MS[30]#49678L, MS[31]#49679L, MS[32]#49680L, MS[33]#49681L, MS[34]#49682L, MS[35]#49683L, MS[36]#49684L, MS[37]#49685L, MS[38]#49686L, MS[39]#49687L, MS[40]#49688L, MS[41]#49689L, MS[42]#49690L, MS[43]#49691L, MS[44]#49692L, MS[45]#49693L, MS[46]#49694L, MS[47]#49695L, MS[48]#49696L, MS[49]#49697L, MS[50]#49698L, MS[51]#49699L, sum#49814L, sum#49815, sum#49816, count#49817L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#49581, processing_day#49583, count#49813L, MS[0]#49648L, MS[1]#49649L, MS[2]#49650L, MS[3]#49651L, MS[4]#49652L, MS[5]#49653L, MS[6]#49654L, MS[7]#49655L, MS[8]#49656L, MS[9]#49657L, MS[10]#49658L, MS[11]#49659L, MS[12]#49660L, MS[13]#49661L, MS[14]#49662L, MS[15]#49663L, MS[16]#49664L, MS[17]#49665L, MS[18]#49666L, MS[19]#49667L, MS[20]#49668L, MS[21]#49669L, MS[22]#49670L, MS[23]#49671L, MS[24]#49672L, MS[25]#49673L, MS[26]#49674L, MS[27]#49675L, MS[28]#49676L, MS[29]#49677L, MS[30]#49678L, MS[31]#49679L, MS[32]#49680L, MS[33]#49681L, MS[34]#49682L, MS[35]#49683L, MS[36]#49684L, MS[37]#49685L, MS[38]#49686L, MS[39]#49687L, MS[40]#49688L, MS[41]#49689L, MS[42]#49690L, MS[43]#49691L, MS[44]#49692L, MS[45]#49693L, MS[46]#49694L, MS[47]#49695L, MS[48]#49696L, MS[49]#49697L, MS[50]#49698L, MS[51]#49699L, sum#49814L, sum#49815, sum#49816, count#49817L]
Keys [2]: [segment#49581, processing_day#49583]
Functions [5]: [count(1), approx_count_distinct(customer_id#49577L, 0.05, 0, 0), sum(events#49587), sum(weighted_amount#49589), avg(amount#49585)]
Aggregate Attributes [5]: [count(1)#49595L, approx_count_distinct(customer_id#49577L, 0.05, 0, 0)#49700L, sum(events#49587)#49701L, sum(weighted_amount#49589)#49702, avg(amount#49585)#49703]
Results [7]: [segment#49581, processing_day#49583, count(1)#49595L AS row_count#49590L, approx_count_distinct(customer_id#49577L, 0.05, 0, 0)#49700L AS unique_customers#49591L, sum(events#49587)#49701L AS event_sum#49592L, sum(weighted_amount#49589)#49702 AS weighted_amount_sum#49593, avg(amount#49585)#49703 AS avg_amount#49594]
(9) Exchange
Input [7]: [segment#49581, processing_day#49583, row_count#49590L, unique_customers#49591L, event_sum#49592L, weighted_amount_sum#49593, avg_amount#49594]
Arguments: rangepartitioning(segment#49581 ASC NULLS FIRST, processing_day#49583 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=4725]
(10) ShuffleQueryStage
Output [7]: [segment#49581, processing_day#49583, row_count#49590L, unique_customers#49591L, event_sum#49592L, weighted_amount_sum#49593, avg_amount#49594]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#49581, processing_day#49583, row_count#49590L, unique_customers#49591L, event_sum#49592L, weighted_amount_sum#49593, avg_amount#49594]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#49581, processing_day#49583, row_count#49590L, unique_customers#49591L, event_sum#49592L, weighted_amount_sum#49593, avg_amount#49594]
Arguments: [segment#49581 ASC NULLS FIRST, processing_day#49583 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#49581, processing_day#49583, row_count#49590L, unique_customers#49591L, event_sum#49592L, weighted_amount_sum#49593, avg_amount#49594]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#49577L, segment#49581, processing_day#49583, amount#49585, events#49587, weighted_amount#49589]
Keys [2]: [segment#49581, processing_day#49583]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#49577L, 0.05, 0, 0), partial_sum(events#49587), partial_sum(weighted_amount#49589), partial_avg(amount#49585)]
Aggregate Attributes [57]: [count#49808L, MS[0]#49596L, MS[1]#49597L, MS[2]#49598L, MS[3]#49599L, MS[4]#49600L, MS[5]#49601L, MS[6]#49602L, MS[7]#49603L, MS[8]#49604L, MS[9]#49605L, MS[10]#49606L, MS[11]#49607L, MS[12]#49608L, MS[13]#49609L, MS[14]#49610L, MS[15]#49611L, MS[16]#49612L, MS[17]#49613L, MS[18]#49614L, MS[19]#49615L, MS[20]#49616L, MS[21]#49617L, MS[22]#49618L, MS[23]#49619L, MS[24]#49620L, MS[25]#49621L, MS[26]#49622L, MS[27]#49623L, MS[28]#49624L, MS[29]#49625L, MS[30]#49626L, MS[31]#49627L, MS[32]#49628L, MS[33]#49629L, MS[34]#49630L, MS[35]#49631L, MS[36]#49632L, MS[37]#49633L, MS[38]#49634L, MS[39]#49635L, MS[40]#49636L, MS[41]#49637L, MS[42]#49638L, MS[43]#49639L, MS[44]#49640L, MS[45]#49641L, MS[46]#49642L, MS[47]#49643L, MS[48]#49644L, MS[49]#49645L, MS[50]#49646L, MS[51]#49647L, sum#49809L, sum#49810, sum#49811, count#49812L]
Results [59]: [segment#49581, processing_day#49583, count#49813L, MS[0]#49648L, MS[1]#49649L, MS[2]#49650L, MS[3]#49651L, MS[4]#49652L, MS[5]#49653L, MS[6]#49654L, MS[7]#49655L, MS[8]#49656L, MS[9]#49657L, MS[10]#49658L, MS[11]#49659L, MS[12]#49660L, MS[13]#49661L, MS[14]#49662L, MS[15]#49663L, MS[16]#49664L, MS[17]#49665L, MS[18]#49666L, MS[19]#49667L, MS[20]#49668L, MS[21]#49669L, MS[22]#49670L, MS[23]#49671L, MS[24]#49672L, MS[25]#49673L, MS[26]#49674L, MS[27]#49675L, MS[28]#49676L, MS[29]#49677L, MS[30]#49678L, MS[31]#49679L, MS[32]#49680L, MS[33]#49681L, MS[34]#49682L, MS[35]#49683L, MS[36]#49684L, MS[37]#49685L, MS[38]#49686L, MS[39]#49687L, MS[40]#49688L, MS[41]#49689L, MS[42]#49690L, MS[43]#49691L, MS[44]#49692L, MS[45]#49693L, MS[46]#49694L, MS[47]#49695L, MS[48]#49696L, MS[49]#49697L, MS[50]#49698L, MS[51]#49699L, sum#49814L, sum#49815, sum#49816, count#49817L]
(15) Exchange
Input [59]: [segment#49581, processing_day#49583, count#49813L, MS[0]#49648L, MS[1]#49649L, MS[2]#49650L, MS[3]#49651L, MS[4]#49652L, MS[5]#49653L, MS[6]#49654L, MS[7]#49655L, MS[8]#49656L, MS[9]#49657L, MS[10]#49658L, MS[11]#49659L, MS[12]#49660L, MS[13]#49661L, MS[14]#49662L, MS[15]#49663L, MS[16]#49664L, MS[17]#49665L, MS[18]#49666L, MS[19]#49667L, MS[20]#49668L, MS[21]#49669L, MS[22]#49670L, MS[23]#49671L, MS[24]#49672L, MS[25]#49673L, MS[26]#49674L, MS[27]#49675L, MS[28]#49676L, MS[29]#49677L, MS[30]#49678L, MS[31]#49679L, MS[32]#49680L, MS[33]#49681L, MS[34]#49682L, MS[35]#49683L, MS[36]#49684L, MS[37]#49685L, MS[38]#49686L, MS[39]#49687L, MS[40]#49688L, MS[41]#49689L, MS[42]#49690L, MS[43]#49691L, MS[44]#49692L, MS[45]#49693L, MS[46]#49694L, MS[47]#49695L, MS[48]#49696L, MS[49]#49697L, MS[50]#49698L, MS[51]#49699L, sum#49814L, sum#49815, sum#49816, count#49817L]
Arguments: hashpartitioning(segment#49581, processing_day#49583, 200), ENSURE_REQUIREMENTS, [plan_id=4683]
(16) HashAggregate
Input [59]: [segment#49581, processing_day#49583, count#49813L, MS[0]#49648L, MS[1]#49649L, MS[2]#49650L, MS[3]#49651L, MS[4]#49652L, MS[5]#49653L, MS[6]#49654L, MS[7]#49655L, MS[8]#49656L, MS[9]#49657L, MS[10]#49658L, MS[11]#49659L, MS[12]#49660L, MS[13]#49661L, MS[14]#49662L, MS[15]#49663L, MS[16]#49664L, MS[17]#49665L, MS[18]#49666L, MS[19]#49667L, MS[20]#49668L, MS[21]#49669L, MS[22]#49670L, MS[23]#49671L, MS[24]#49672L, MS[25]#49673L, MS[26]#49674L, MS[27]#49675L, MS[28]#49676L, MS[29]#49677L, MS[30]#49678L, MS[31]#49679L, MS[32]#49680L, MS[33]#49681L, MS[34]#49682L, MS[35]#49683L, MS[36]#49684L, MS[37]#49685L, MS[38]#49686L, MS[39]#49687L, MS[40]#49688L, MS[41]#49689L, MS[42]#49690L, MS[43]#49691L, MS[44]#49692L, MS[45]#49693L, MS[46]#49694L, MS[47]#49695L, MS[48]#49696L, MS[49]#49697L, MS[50]#49698L, MS[51]#49699L, sum#49814L, sum#49815, sum#49816, count#49817L]
Keys [2]: [segment#49581, processing_day#49583]
Functions [5]: [count(1), approx_count_distinct(customer_id#49577L, 0.05, 0, 0), sum(events#49587), sum(weighted_amount#49589), avg(amount#49585)]
Aggregate Attributes [5]: [count(1)#49595L, approx_count_distinct(customer_id#49577L, 0.05, 0, 0)#49700L, sum(events#49587)#49701L, sum(weighted_amount#49589)#49702, avg(amount#49585)#49703]
Results [7]: [segment#49581, processing_day#49583, count(1)#49595L AS row_count#49590L, approx_count_distinct(customer_id#49577L, 0.05, 0, 0)#49700L AS unique_customers#49591L, sum(events#49587)#49701L AS event_sum#49592L, sum(weighted_amount#49589)#49702 AS weighted_amount_sum#49593, avg(amount#49585)#49703 AS avg_amount#49594]
(17) Exchange
Input [7]: [segment#49581, processing_day#49583, row_count#49590L, unique_customers#49591L, event_sum#49592L, weighted_amount_sum#49593, avg_amount#49594]
Arguments: rangepartitioning(segment#49581 ASC NULLS FIRST, processing_day#49583 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=4686]
(18) Sort
Input [7]: [segment#49581, processing_day#49583, row_count#49590L, unique_customers#49591L, event_sum#49592L, weighted_amount_sum#49593, avg_amount#49594]
Arguments: [segment#49581 ASC NULLS FIRST, processing_day#49583 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#49581, processing_day#49583, row_count#49590L, unique_customers#49591L, event_sum#49592L, weighted_amount_sum#49593, avg_amount#49594]
Arguments: isFinalPlan=true