== 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#72593L]
Arguments: Range (10000000, 11000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#72593L % 250000) AS customer_id#72595L, concat(segment-, cast(cast((id#72593L % 12) as int) as string)) AS segment#72599, cast((id#72593L % 14) as int) AS processing_day#72601, ((cast(((id#72593L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#72603, cast((((id#72593L * 29) % 7) + 1) as int) AS events#72605]
Input [1]: [id#72593L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#72595L, segment#72599, processing_day#72601, amount#72603, events#72605, (amount#72603 * cast(events#72605 as double)) AS weighted_amount#72607]
Input [5]: [customer_id#72595L, segment#72599, processing_day#72601, amount#72603, events#72605]
(4) HashAggregate
Input [6]: [customer_id#72595L, segment#72599, processing_day#72601, amount#72603, events#72605, weighted_amount#72607]
Keys [2]: [segment#72599, processing_day#72601]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#72595L, 0.05, 0, 0), partial_sum(events#72605), partial_sum(weighted_amount#72607), partial_avg(amount#72603)]
Aggregate Attributes [57]: [count#72826L, MS[0]#72614L, MS[1]#72615L, MS[2]#72616L, MS[3]#72617L, MS[4]#72618L, MS[5]#72619L, MS[6]#72620L, MS[7]#72621L, MS[8]#72622L, MS[9]#72623L, MS[10]#72624L, MS[11]#72625L, MS[12]#72626L, MS[13]#72627L, MS[14]#72628L, MS[15]#72629L, MS[16]#72630L, MS[17]#72631L, MS[18]#72632L, MS[19]#72633L, MS[20]#72634L, MS[21]#72635L, MS[22]#72636L, MS[23]#72637L, MS[24]#72638L, MS[25]#72639L, MS[26]#72640L, MS[27]#72641L, MS[28]#72642L, MS[29]#72643L, MS[30]#72644L, MS[31]#72645L, MS[32]#72646L, MS[33]#72647L, MS[34]#72648L, MS[35]#72649L, MS[36]#72650L, MS[37]#72651L, MS[38]#72652L, MS[39]#72653L, MS[40]#72654L, MS[41]#72655L, MS[42]#72656L, MS[43]#72657L, MS[44]#72658L, MS[45]#72659L, MS[46]#72660L, MS[47]#72661L, MS[48]#72662L, MS[49]#72663L, MS[50]#72664L, MS[51]#72665L, sum#72827L, sum#72828, sum#72829, count#72830L]
Results [59]: [segment#72599, processing_day#72601, count#72831L, MS[0]#72666L, MS[1]#72667L, MS[2]#72668L, MS[3]#72669L, MS[4]#72670L, MS[5]#72671L, MS[6]#72672L, MS[7]#72673L, MS[8]#72674L, MS[9]#72675L, MS[10]#72676L, MS[11]#72677L, MS[12]#72678L, MS[13]#72679L, MS[14]#72680L, MS[15]#72681L, MS[16]#72682L, MS[17]#72683L, MS[18]#72684L, MS[19]#72685L, MS[20]#72686L, MS[21]#72687L, MS[22]#72688L, MS[23]#72689L, MS[24]#72690L, MS[25]#72691L, MS[26]#72692L, MS[27]#72693L, MS[28]#72694L, MS[29]#72695L, MS[30]#72696L, MS[31]#72697L, MS[32]#72698L, MS[33]#72699L, MS[34]#72700L, MS[35]#72701L, MS[36]#72702L, MS[37]#72703L, MS[38]#72704L, MS[39]#72705L, MS[40]#72706L, MS[41]#72707L, MS[42]#72708L, MS[43]#72709L, MS[44]#72710L, MS[45]#72711L, MS[46]#72712L, MS[47]#72713L, MS[48]#72714L, MS[49]#72715L, MS[50]#72716L, MS[51]#72717L, sum#72832L, sum#72833, sum#72834, count#72835L]
(5) Exchange
Input [59]: [segment#72599, processing_day#72601, count#72831L, MS[0]#72666L, MS[1]#72667L, MS[2]#72668L, MS[3]#72669L, MS[4]#72670L, MS[5]#72671L, MS[6]#72672L, MS[7]#72673L, MS[8]#72674L, MS[9]#72675L, MS[10]#72676L, MS[11]#72677L, MS[12]#72678L, MS[13]#72679L, MS[14]#72680L, MS[15]#72681L, MS[16]#72682L, MS[17]#72683L, MS[18]#72684L, MS[19]#72685L, MS[20]#72686L, MS[21]#72687L, MS[22]#72688L, MS[23]#72689L, MS[24]#72690L, MS[25]#72691L, MS[26]#72692L, MS[27]#72693L, MS[28]#72694L, MS[29]#72695L, MS[30]#72696L, MS[31]#72697L, MS[32]#72698L, MS[33]#72699L, MS[34]#72700L, MS[35]#72701L, MS[36]#72702L, MS[37]#72703L, MS[38]#72704L, MS[39]#72705L, MS[40]#72706L, MS[41]#72707L, MS[42]#72708L, MS[43]#72709L, MS[44]#72710L, MS[45]#72711L, MS[46]#72712L, MS[47]#72713L, MS[48]#72714L, MS[49]#72715L, MS[50]#72716L, MS[51]#72717L, sum#72832L, sum#72833, sum#72834, count#72835L]
Arguments: hashpartitioning(segment#72599, processing_day#72601, 200), ENSURE_REQUIREMENTS, [plan_id=6867]
(6) ShuffleQueryStage
Output [59]: [segment#72599, processing_day#72601, count#72831L, MS[0]#72666L, MS[1]#72667L, MS[2]#72668L, MS[3]#72669L, MS[4]#72670L, MS[5]#72671L, MS[6]#72672L, MS[7]#72673L, MS[8]#72674L, MS[9]#72675L, MS[10]#72676L, MS[11]#72677L, MS[12]#72678L, MS[13]#72679L, MS[14]#72680L, MS[15]#72681L, MS[16]#72682L, MS[17]#72683L, MS[18]#72684L, MS[19]#72685L, MS[20]#72686L, MS[21]#72687L, MS[22]#72688L, MS[23]#72689L, MS[24]#72690L, MS[25]#72691L, MS[26]#72692L, MS[27]#72693L, MS[28]#72694L, MS[29]#72695L, MS[30]#72696L, MS[31]#72697L, MS[32]#72698L, MS[33]#72699L, MS[34]#72700L, MS[35]#72701L, MS[36]#72702L, MS[37]#72703L, MS[38]#72704L, MS[39]#72705L, MS[40]#72706L, MS[41]#72707L, MS[42]#72708L, MS[43]#72709L, MS[44]#72710L, MS[45]#72711L, MS[46]#72712L, MS[47]#72713L, MS[48]#72714L, MS[49]#72715L, MS[50]#72716L, MS[51]#72717L, sum#72832L, sum#72833, sum#72834, count#72835L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#72599, processing_day#72601, count#72831L, MS[0]#72666L, MS[1]#72667L, MS[2]#72668L, MS[3]#72669L, MS[4]#72670L, MS[5]#72671L, MS[6]#72672L, MS[7]#72673L, MS[8]#72674L, MS[9]#72675L, MS[10]#72676L, MS[11]#72677L, MS[12]#72678L, MS[13]#72679L, MS[14]#72680L, MS[15]#72681L, MS[16]#72682L, MS[17]#72683L, MS[18]#72684L, MS[19]#72685L, MS[20]#72686L, MS[21]#72687L, MS[22]#72688L, MS[23]#72689L, MS[24]#72690L, MS[25]#72691L, MS[26]#72692L, MS[27]#72693L, MS[28]#72694L, MS[29]#72695L, MS[30]#72696L, MS[31]#72697L, MS[32]#72698L, MS[33]#72699L, MS[34]#72700L, MS[35]#72701L, MS[36]#72702L, MS[37]#72703L, MS[38]#72704L, MS[39]#72705L, MS[40]#72706L, MS[41]#72707L, MS[42]#72708L, MS[43]#72709L, MS[44]#72710L, MS[45]#72711L, MS[46]#72712L, MS[47]#72713L, MS[48]#72714L, MS[49]#72715L, MS[50]#72716L, MS[51]#72717L, sum#72832L, sum#72833, sum#72834, count#72835L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#72599, processing_day#72601, count#72831L, MS[0]#72666L, MS[1]#72667L, MS[2]#72668L, MS[3]#72669L, MS[4]#72670L, MS[5]#72671L, MS[6]#72672L, MS[7]#72673L, MS[8]#72674L, MS[9]#72675L, MS[10]#72676L, MS[11]#72677L, MS[12]#72678L, MS[13]#72679L, MS[14]#72680L, MS[15]#72681L, MS[16]#72682L, MS[17]#72683L, MS[18]#72684L, MS[19]#72685L, MS[20]#72686L, MS[21]#72687L, MS[22]#72688L, MS[23]#72689L, MS[24]#72690L, MS[25]#72691L, MS[26]#72692L, MS[27]#72693L, MS[28]#72694L, MS[29]#72695L, MS[30]#72696L, MS[31]#72697L, MS[32]#72698L, MS[33]#72699L, MS[34]#72700L, MS[35]#72701L, MS[36]#72702L, MS[37]#72703L, MS[38]#72704L, MS[39]#72705L, MS[40]#72706L, MS[41]#72707L, MS[42]#72708L, MS[43]#72709L, MS[44]#72710L, MS[45]#72711L, MS[46]#72712L, MS[47]#72713L, MS[48]#72714L, MS[49]#72715L, MS[50]#72716L, MS[51]#72717L, sum#72832L, sum#72833, sum#72834, count#72835L]
Keys [2]: [segment#72599, processing_day#72601]
Functions [5]: [count(1), approx_count_distinct(customer_id#72595L, 0.05, 0, 0), sum(events#72605), sum(weighted_amount#72607), avg(amount#72603)]
Aggregate Attributes [5]: [count(1)#72613L, approx_count_distinct(customer_id#72595L, 0.05, 0, 0)#72718L, sum(events#72605)#72719L, sum(weighted_amount#72607)#72720, avg(amount#72603)#72721]
Results [7]: [segment#72599, processing_day#72601, count(1)#72613L AS row_count#72608L, approx_count_distinct(customer_id#72595L, 0.05, 0, 0)#72718L AS unique_customers#72609L, sum(events#72605)#72719L AS event_sum#72610L, sum(weighted_amount#72607)#72720 AS weighted_amount_sum#72611, avg(amount#72603)#72721 AS avg_amount#72612]
(9) Exchange
Input [7]: [segment#72599, processing_day#72601, row_count#72608L, unique_customers#72609L, event_sum#72610L, weighted_amount_sum#72611, avg_amount#72612]
Arguments: rangepartitioning(segment#72599 ASC NULLS FIRST, processing_day#72601 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=6889]
(10) ShuffleQueryStage
Output [7]: [segment#72599, processing_day#72601, row_count#72608L, unique_customers#72609L, event_sum#72610L, weighted_amount_sum#72611, avg_amount#72612]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#72599, processing_day#72601, row_count#72608L, unique_customers#72609L, event_sum#72610L, weighted_amount_sum#72611, avg_amount#72612]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#72599, processing_day#72601, row_count#72608L, unique_customers#72609L, event_sum#72610L, weighted_amount_sum#72611, avg_amount#72612]
Arguments: [segment#72599 ASC NULLS FIRST, processing_day#72601 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#72599, processing_day#72601, row_count#72608L, unique_customers#72609L, event_sum#72610L, weighted_amount_sum#72611, avg_amount#72612]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#72595L, segment#72599, processing_day#72601, amount#72603, events#72605, weighted_amount#72607]
Keys [2]: [segment#72599, processing_day#72601]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#72595L, 0.05, 0, 0), partial_sum(events#72605), partial_sum(weighted_amount#72607), partial_avg(amount#72603)]
Aggregate Attributes [57]: [count#72826L, MS[0]#72614L, MS[1]#72615L, MS[2]#72616L, MS[3]#72617L, MS[4]#72618L, MS[5]#72619L, MS[6]#72620L, MS[7]#72621L, MS[8]#72622L, MS[9]#72623L, MS[10]#72624L, MS[11]#72625L, MS[12]#72626L, MS[13]#72627L, MS[14]#72628L, MS[15]#72629L, MS[16]#72630L, MS[17]#72631L, MS[18]#72632L, MS[19]#72633L, MS[20]#72634L, MS[21]#72635L, MS[22]#72636L, MS[23]#72637L, MS[24]#72638L, MS[25]#72639L, MS[26]#72640L, MS[27]#72641L, MS[28]#72642L, MS[29]#72643L, MS[30]#72644L, MS[31]#72645L, MS[32]#72646L, MS[33]#72647L, MS[34]#72648L, MS[35]#72649L, MS[36]#72650L, MS[37]#72651L, MS[38]#72652L, MS[39]#72653L, MS[40]#72654L, MS[41]#72655L, MS[42]#72656L, MS[43]#72657L, MS[44]#72658L, MS[45]#72659L, MS[46]#72660L, MS[47]#72661L, MS[48]#72662L, MS[49]#72663L, MS[50]#72664L, MS[51]#72665L, sum#72827L, sum#72828, sum#72829, count#72830L]
Results [59]: [segment#72599, processing_day#72601, count#72831L, MS[0]#72666L, MS[1]#72667L, MS[2]#72668L, MS[3]#72669L, MS[4]#72670L, MS[5]#72671L, MS[6]#72672L, MS[7]#72673L, MS[8]#72674L, MS[9]#72675L, MS[10]#72676L, MS[11]#72677L, MS[12]#72678L, MS[13]#72679L, MS[14]#72680L, MS[15]#72681L, MS[16]#72682L, MS[17]#72683L, MS[18]#72684L, MS[19]#72685L, MS[20]#72686L, MS[21]#72687L, MS[22]#72688L, MS[23]#72689L, MS[24]#72690L, MS[25]#72691L, MS[26]#72692L, MS[27]#72693L, MS[28]#72694L, MS[29]#72695L, MS[30]#72696L, MS[31]#72697L, MS[32]#72698L, MS[33]#72699L, MS[34]#72700L, MS[35]#72701L, MS[36]#72702L, MS[37]#72703L, MS[38]#72704L, MS[39]#72705L, MS[40]#72706L, MS[41]#72707L, MS[42]#72708L, MS[43]#72709L, MS[44]#72710L, MS[45]#72711L, MS[46]#72712L, MS[47]#72713L, MS[48]#72714L, MS[49]#72715L, MS[50]#72716L, MS[51]#72717L, sum#72832L, sum#72833, sum#72834, count#72835L]
(15) Exchange
Input [59]: [segment#72599, processing_day#72601, count#72831L, MS[0]#72666L, MS[1]#72667L, MS[2]#72668L, MS[3]#72669L, MS[4]#72670L, MS[5]#72671L, MS[6]#72672L, MS[7]#72673L, MS[8]#72674L, MS[9]#72675L, MS[10]#72676L, MS[11]#72677L, MS[12]#72678L, MS[13]#72679L, MS[14]#72680L, MS[15]#72681L, MS[16]#72682L, MS[17]#72683L, MS[18]#72684L, MS[19]#72685L, MS[20]#72686L, MS[21]#72687L, MS[22]#72688L, MS[23]#72689L, MS[24]#72690L, MS[25]#72691L, MS[26]#72692L, MS[27]#72693L, MS[28]#72694L, MS[29]#72695L, MS[30]#72696L, MS[31]#72697L, MS[32]#72698L, MS[33]#72699L, MS[34]#72700L, MS[35]#72701L, MS[36]#72702L, MS[37]#72703L, MS[38]#72704L, MS[39]#72705L, MS[40]#72706L, MS[41]#72707L, MS[42]#72708L, MS[43]#72709L, MS[44]#72710L, MS[45]#72711L, MS[46]#72712L, MS[47]#72713L, MS[48]#72714L, MS[49]#72715L, MS[50]#72716L, MS[51]#72717L, sum#72832L, sum#72833, sum#72834, count#72835L]
Arguments: hashpartitioning(segment#72599, processing_day#72601, 200), ENSURE_REQUIREMENTS, [plan_id=6847]
(16) HashAggregate
Input [59]: [segment#72599, processing_day#72601, count#72831L, MS[0]#72666L, MS[1]#72667L, MS[2]#72668L, MS[3]#72669L, MS[4]#72670L, MS[5]#72671L, MS[6]#72672L, MS[7]#72673L, MS[8]#72674L, MS[9]#72675L, MS[10]#72676L, MS[11]#72677L, MS[12]#72678L, MS[13]#72679L, MS[14]#72680L, MS[15]#72681L, MS[16]#72682L, MS[17]#72683L, MS[18]#72684L, MS[19]#72685L, MS[20]#72686L, MS[21]#72687L, MS[22]#72688L, MS[23]#72689L, MS[24]#72690L, MS[25]#72691L, MS[26]#72692L, MS[27]#72693L, MS[28]#72694L, MS[29]#72695L, MS[30]#72696L, MS[31]#72697L, MS[32]#72698L, MS[33]#72699L, MS[34]#72700L, MS[35]#72701L, MS[36]#72702L, MS[37]#72703L, MS[38]#72704L, MS[39]#72705L, MS[40]#72706L, MS[41]#72707L, MS[42]#72708L, MS[43]#72709L, MS[44]#72710L, MS[45]#72711L, MS[46]#72712L, MS[47]#72713L, MS[48]#72714L, MS[49]#72715L, MS[50]#72716L, MS[51]#72717L, sum#72832L, sum#72833, sum#72834, count#72835L]
Keys [2]: [segment#72599, processing_day#72601]
Functions [5]: [count(1), approx_count_distinct(customer_id#72595L, 0.05, 0, 0), sum(events#72605), sum(weighted_amount#72607), avg(amount#72603)]
Aggregate Attributes [5]: [count(1)#72613L, approx_count_distinct(customer_id#72595L, 0.05, 0, 0)#72718L, sum(events#72605)#72719L, sum(weighted_amount#72607)#72720, avg(amount#72603)#72721]
Results [7]: [segment#72599, processing_day#72601, count(1)#72613L AS row_count#72608L, approx_count_distinct(customer_id#72595L, 0.05, 0, 0)#72718L AS unique_customers#72609L, sum(events#72605)#72719L AS event_sum#72610L, sum(weighted_amount#72607)#72720 AS weighted_amount_sum#72611, avg(amount#72603)#72721 AS avg_amount#72612]
(17) Exchange
Input [7]: [segment#72599, processing_day#72601, row_count#72608L, unique_customers#72609L, event_sum#72610L, weighted_amount_sum#72611, avg_amount#72612]
Arguments: rangepartitioning(segment#72599 ASC NULLS FIRST, processing_day#72601 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=6850]
(18) Sort
Input [7]: [segment#72599, processing_day#72601, row_count#72608L, unique_customers#72609L, event_sum#72610L, weighted_amount_sum#72611, avg_amount#72612]
Arguments: [segment#72599 ASC NULLS FIRST, processing_day#72601 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#72599, processing_day#72601, row_count#72608L, unique_customers#72609L, event_sum#72610L, weighted_amount_sum#72611, avg_amount#72612]
Arguments: isFinalPlan=true