== 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#33629L]
Arguments: Range (14000000, 15000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#33629L % 250000) AS customer_id#33631L, concat(segment-, cast(cast((id#33629L % 12) as int) as string)) AS segment#33635, cast((id#33629L % 14) as int) AS processing_day#33637, ((cast(((id#33629L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#33639, cast((((id#33629L * 29) % 7) + 1) as int) AS events#33641]
Input [1]: [id#33629L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#33631L, segment#33635, processing_day#33637, amount#33639, events#33641, (amount#33639 * cast(events#33641 as double)) AS weighted_amount#33643]
Input [5]: [customer_id#33631L, segment#33635, processing_day#33637, amount#33639, events#33641]
(4) HashAggregate
Input [6]: [customer_id#33631L, segment#33635, processing_day#33637, amount#33639, events#33641, weighted_amount#33643]
Keys [2]: [segment#33635, processing_day#33637]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#33631L, 0.05, 0, 0), partial_sum(events#33641), partial_sum(weighted_amount#33643), partial_avg(amount#33639)]
Aggregate Attributes [57]: [count#33862L, MS[0]#33650L, MS[1]#33651L, MS[2]#33652L, MS[3]#33653L, MS[4]#33654L, MS[5]#33655L, MS[6]#33656L, MS[7]#33657L, MS[8]#33658L, MS[9]#33659L, MS[10]#33660L, MS[11]#33661L, MS[12]#33662L, MS[13]#33663L, MS[14]#33664L, MS[15]#33665L, MS[16]#33666L, MS[17]#33667L, MS[18]#33668L, MS[19]#33669L, MS[20]#33670L, MS[21]#33671L, MS[22]#33672L, MS[23]#33673L, MS[24]#33674L, MS[25]#33675L, MS[26]#33676L, MS[27]#33677L, MS[28]#33678L, MS[29]#33679L, MS[30]#33680L, MS[31]#33681L, MS[32]#33682L, MS[33]#33683L, MS[34]#33684L, MS[35]#33685L, MS[36]#33686L, MS[37]#33687L, MS[38]#33688L, MS[39]#33689L, MS[40]#33690L, MS[41]#33691L, MS[42]#33692L, MS[43]#33693L, MS[44]#33694L, MS[45]#33695L, MS[46]#33696L, MS[47]#33697L, MS[48]#33698L, MS[49]#33699L, MS[50]#33700L, MS[51]#33701L, sum#33863L, sum#33864, sum#33865, count#33866L]
Results [59]: [segment#33635, processing_day#33637, count#33867L, MS[0]#33702L, MS[1]#33703L, MS[2]#33704L, MS[3]#33705L, MS[4]#33706L, MS[5]#33707L, MS[6]#33708L, MS[7]#33709L, MS[8]#33710L, MS[9]#33711L, MS[10]#33712L, MS[11]#33713L, MS[12]#33714L, MS[13]#33715L, MS[14]#33716L, MS[15]#33717L, MS[16]#33718L, MS[17]#33719L, MS[18]#33720L, MS[19]#33721L, MS[20]#33722L, MS[21]#33723L, MS[22]#33724L, MS[23]#33725L, MS[24]#33726L, MS[25]#33727L, MS[26]#33728L, MS[27]#33729L, MS[28]#33730L, MS[29]#33731L, MS[30]#33732L, MS[31]#33733L, MS[32]#33734L, MS[33]#33735L, MS[34]#33736L, MS[35]#33737L, MS[36]#33738L, MS[37]#33739L, MS[38]#33740L, MS[39]#33741L, MS[40]#33742L, MS[41]#33743L, MS[42]#33744L, MS[43]#33745L, MS[44]#33746L, MS[45]#33747L, MS[46]#33748L, MS[47]#33749L, MS[48]#33750L, MS[49]#33751L, MS[50]#33752L, MS[51]#33753L, sum#33868L, sum#33869, sum#33870, count#33871L]
(5) Exchange
Input [59]: [segment#33635, processing_day#33637, count#33867L, MS[0]#33702L, MS[1]#33703L, MS[2]#33704L, MS[3]#33705L, MS[4]#33706L, MS[5]#33707L, MS[6]#33708L, MS[7]#33709L, MS[8]#33710L, MS[9]#33711L, MS[10]#33712L, MS[11]#33713L, MS[12]#33714L, MS[13]#33715L, MS[14]#33716L, MS[15]#33717L, MS[16]#33718L, MS[17]#33719L, MS[18]#33720L, MS[19]#33721L, MS[20]#33722L, MS[21]#33723L, MS[22]#33724L, MS[23]#33725L, MS[24]#33726L, MS[25]#33727L, MS[26]#33728L, MS[27]#33729L, MS[28]#33730L, MS[29]#33731L, MS[30]#33732L, MS[31]#33733L, MS[32]#33734L, MS[33]#33735L, MS[34]#33736L, MS[35]#33737L, MS[36]#33738L, MS[37]#33739L, MS[38]#33740L, MS[39]#33741L, MS[40]#33742L, MS[41]#33743L, MS[42]#33744L, MS[43]#33745L, MS[44]#33746L, MS[45]#33747L, MS[46]#33748L, MS[47]#33749L, MS[48]#33750L, MS[49]#33751L, MS[50]#33752L, MS[51]#33753L, sum#33868L, sum#33869, sum#33870, count#33871L]
Arguments: hashpartitioning(segment#33635, processing_day#33637, 200), ENSURE_REQUIREMENTS, [plan_id=3203]
(6) ShuffleQueryStage
Output [59]: [segment#33635, processing_day#33637, count#33867L, MS[0]#33702L, MS[1]#33703L, MS[2]#33704L, MS[3]#33705L, MS[4]#33706L, MS[5]#33707L, MS[6]#33708L, MS[7]#33709L, MS[8]#33710L, MS[9]#33711L, MS[10]#33712L, MS[11]#33713L, MS[12]#33714L, MS[13]#33715L, MS[14]#33716L, MS[15]#33717L, MS[16]#33718L, MS[17]#33719L, MS[18]#33720L, MS[19]#33721L, MS[20]#33722L, MS[21]#33723L, MS[22]#33724L, MS[23]#33725L, MS[24]#33726L, MS[25]#33727L, MS[26]#33728L, MS[27]#33729L, MS[28]#33730L, MS[29]#33731L, MS[30]#33732L, MS[31]#33733L, MS[32]#33734L, MS[33]#33735L, MS[34]#33736L, MS[35]#33737L, MS[36]#33738L, MS[37]#33739L, MS[38]#33740L, MS[39]#33741L, MS[40]#33742L, MS[41]#33743L, MS[42]#33744L, MS[43]#33745L, MS[44]#33746L, MS[45]#33747L, MS[46]#33748L, MS[47]#33749L, MS[48]#33750L, MS[49]#33751L, MS[50]#33752L, MS[51]#33753L, sum#33868L, sum#33869, sum#33870, count#33871L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#33635, processing_day#33637, count#33867L, MS[0]#33702L, MS[1]#33703L, MS[2]#33704L, MS[3]#33705L, MS[4]#33706L, MS[5]#33707L, MS[6]#33708L, MS[7]#33709L, MS[8]#33710L, MS[9]#33711L, MS[10]#33712L, MS[11]#33713L, MS[12]#33714L, MS[13]#33715L, MS[14]#33716L, MS[15]#33717L, MS[16]#33718L, MS[17]#33719L, MS[18]#33720L, MS[19]#33721L, MS[20]#33722L, MS[21]#33723L, MS[22]#33724L, MS[23]#33725L, MS[24]#33726L, MS[25]#33727L, MS[26]#33728L, MS[27]#33729L, MS[28]#33730L, MS[29]#33731L, MS[30]#33732L, MS[31]#33733L, MS[32]#33734L, MS[33]#33735L, MS[34]#33736L, MS[35]#33737L, MS[36]#33738L, MS[37]#33739L, MS[38]#33740L, MS[39]#33741L, MS[40]#33742L, MS[41]#33743L, MS[42]#33744L, MS[43]#33745L, MS[44]#33746L, MS[45]#33747L, MS[46]#33748L, MS[47]#33749L, MS[48]#33750L, MS[49]#33751L, MS[50]#33752L, MS[51]#33753L, sum#33868L, sum#33869, sum#33870, count#33871L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#33635, processing_day#33637, count#33867L, MS[0]#33702L, MS[1]#33703L, MS[2]#33704L, MS[3]#33705L, MS[4]#33706L, MS[5]#33707L, MS[6]#33708L, MS[7]#33709L, MS[8]#33710L, MS[9]#33711L, MS[10]#33712L, MS[11]#33713L, MS[12]#33714L, MS[13]#33715L, MS[14]#33716L, MS[15]#33717L, MS[16]#33718L, MS[17]#33719L, MS[18]#33720L, MS[19]#33721L, MS[20]#33722L, MS[21]#33723L, MS[22]#33724L, MS[23]#33725L, MS[24]#33726L, MS[25]#33727L, MS[26]#33728L, MS[27]#33729L, MS[28]#33730L, MS[29]#33731L, MS[30]#33732L, MS[31]#33733L, MS[32]#33734L, MS[33]#33735L, MS[34]#33736L, MS[35]#33737L, MS[36]#33738L, MS[37]#33739L, MS[38]#33740L, MS[39]#33741L, MS[40]#33742L, MS[41]#33743L, MS[42]#33744L, MS[43]#33745L, MS[44]#33746L, MS[45]#33747L, MS[46]#33748L, MS[47]#33749L, MS[48]#33750L, MS[49]#33751L, MS[50]#33752L, MS[51]#33753L, sum#33868L, sum#33869, sum#33870, count#33871L]
Keys [2]: [segment#33635, processing_day#33637]
Functions [5]: [count(1), approx_count_distinct(customer_id#33631L, 0.05, 0, 0), sum(events#33641), sum(weighted_amount#33643), avg(amount#33639)]
Aggregate Attributes [5]: [count(1)#33649L, approx_count_distinct(customer_id#33631L, 0.05, 0, 0)#33754L, sum(events#33641)#33755L, sum(weighted_amount#33643)#33756, avg(amount#33639)#33757]
Results [7]: [segment#33635, processing_day#33637, count(1)#33649L AS row_count#33644L, approx_count_distinct(customer_id#33631L, 0.05, 0, 0)#33754L AS unique_customers#33645L, sum(events#33641)#33755L AS event_sum#33646L, sum(weighted_amount#33643)#33756 AS weighted_amount_sum#33647, avg(amount#33639)#33757 AS avg_amount#33648]
(9) Exchange
Input [7]: [segment#33635, processing_day#33637, row_count#33644L, unique_customers#33645L, event_sum#33646L, weighted_amount_sum#33647, avg_amount#33648]
Arguments: rangepartitioning(segment#33635 ASC NULLS FIRST, processing_day#33637 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=3225]
(10) ShuffleQueryStage
Output [7]: [segment#33635, processing_day#33637, row_count#33644L, unique_customers#33645L, event_sum#33646L, weighted_amount_sum#33647, avg_amount#33648]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#33635, processing_day#33637, row_count#33644L, unique_customers#33645L, event_sum#33646L, weighted_amount_sum#33647, avg_amount#33648]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#33635, processing_day#33637, row_count#33644L, unique_customers#33645L, event_sum#33646L, weighted_amount_sum#33647, avg_amount#33648]
Arguments: [segment#33635 ASC NULLS FIRST, processing_day#33637 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#33635, processing_day#33637, row_count#33644L, unique_customers#33645L, event_sum#33646L, weighted_amount_sum#33647, avg_amount#33648]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#33631L, segment#33635, processing_day#33637, amount#33639, events#33641, weighted_amount#33643]
Keys [2]: [segment#33635, processing_day#33637]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#33631L, 0.05, 0, 0), partial_sum(events#33641), partial_sum(weighted_amount#33643), partial_avg(amount#33639)]
Aggregate Attributes [57]: [count#33862L, MS[0]#33650L, MS[1]#33651L, MS[2]#33652L, MS[3]#33653L, MS[4]#33654L, MS[5]#33655L, MS[6]#33656L, MS[7]#33657L, MS[8]#33658L, MS[9]#33659L, MS[10]#33660L, MS[11]#33661L, MS[12]#33662L, MS[13]#33663L, MS[14]#33664L, MS[15]#33665L, MS[16]#33666L, MS[17]#33667L, MS[18]#33668L, MS[19]#33669L, MS[20]#33670L, MS[21]#33671L, MS[22]#33672L, MS[23]#33673L, MS[24]#33674L, MS[25]#33675L, MS[26]#33676L, MS[27]#33677L, MS[28]#33678L, MS[29]#33679L, MS[30]#33680L, MS[31]#33681L, MS[32]#33682L, MS[33]#33683L, MS[34]#33684L, MS[35]#33685L, MS[36]#33686L, MS[37]#33687L, MS[38]#33688L, MS[39]#33689L, MS[40]#33690L, MS[41]#33691L, MS[42]#33692L, MS[43]#33693L, MS[44]#33694L, MS[45]#33695L, MS[46]#33696L, MS[47]#33697L, MS[48]#33698L, MS[49]#33699L, MS[50]#33700L, MS[51]#33701L, sum#33863L, sum#33864, sum#33865, count#33866L]
Results [59]: [segment#33635, processing_day#33637, count#33867L, MS[0]#33702L, MS[1]#33703L, MS[2]#33704L, MS[3]#33705L, MS[4]#33706L, MS[5]#33707L, MS[6]#33708L, MS[7]#33709L, MS[8]#33710L, MS[9]#33711L, MS[10]#33712L, MS[11]#33713L, MS[12]#33714L, MS[13]#33715L, MS[14]#33716L, MS[15]#33717L, MS[16]#33718L, MS[17]#33719L, MS[18]#33720L, MS[19]#33721L, MS[20]#33722L, MS[21]#33723L, MS[22]#33724L, MS[23]#33725L, MS[24]#33726L, MS[25]#33727L, MS[26]#33728L, MS[27]#33729L, MS[28]#33730L, MS[29]#33731L, MS[30]#33732L, MS[31]#33733L, MS[32]#33734L, MS[33]#33735L, MS[34]#33736L, MS[35]#33737L, MS[36]#33738L, MS[37]#33739L, MS[38]#33740L, MS[39]#33741L, MS[40]#33742L, MS[41]#33743L, MS[42]#33744L, MS[43]#33745L, MS[44]#33746L, MS[45]#33747L, MS[46]#33748L, MS[47]#33749L, MS[48]#33750L, MS[49]#33751L, MS[50]#33752L, MS[51]#33753L, sum#33868L, sum#33869, sum#33870, count#33871L]
(15) Exchange
Input [59]: [segment#33635, processing_day#33637, count#33867L, MS[0]#33702L, MS[1]#33703L, MS[2]#33704L, MS[3]#33705L, MS[4]#33706L, MS[5]#33707L, MS[6]#33708L, MS[7]#33709L, MS[8]#33710L, MS[9]#33711L, MS[10]#33712L, MS[11]#33713L, MS[12]#33714L, MS[13]#33715L, MS[14]#33716L, MS[15]#33717L, MS[16]#33718L, MS[17]#33719L, MS[18]#33720L, MS[19]#33721L, MS[20]#33722L, MS[21]#33723L, MS[22]#33724L, MS[23]#33725L, MS[24]#33726L, MS[25]#33727L, MS[26]#33728L, MS[27]#33729L, MS[28]#33730L, MS[29]#33731L, MS[30]#33732L, MS[31]#33733L, MS[32]#33734L, MS[33]#33735L, MS[34]#33736L, MS[35]#33737L, MS[36]#33738L, MS[37]#33739L, MS[38]#33740L, MS[39]#33741L, MS[40]#33742L, MS[41]#33743L, MS[42]#33744L, MS[43]#33745L, MS[44]#33746L, MS[45]#33747L, MS[46]#33748L, MS[47]#33749L, MS[48]#33750L, MS[49]#33751L, MS[50]#33752L, MS[51]#33753L, sum#33868L, sum#33869, sum#33870, count#33871L]
Arguments: hashpartitioning(segment#33635, processing_day#33637, 200), ENSURE_REQUIREMENTS, [plan_id=3183]
(16) HashAggregate
Input [59]: [segment#33635, processing_day#33637, count#33867L, MS[0]#33702L, MS[1]#33703L, MS[2]#33704L, MS[3]#33705L, MS[4]#33706L, MS[5]#33707L, MS[6]#33708L, MS[7]#33709L, MS[8]#33710L, MS[9]#33711L, MS[10]#33712L, MS[11]#33713L, MS[12]#33714L, MS[13]#33715L, MS[14]#33716L, MS[15]#33717L, MS[16]#33718L, MS[17]#33719L, MS[18]#33720L, MS[19]#33721L, MS[20]#33722L, MS[21]#33723L, MS[22]#33724L, MS[23]#33725L, MS[24]#33726L, MS[25]#33727L, MS[26]#33728L, MS[27]#33729L, MS[28]#33730L, MS[29]#33731L, MS[30]#33732L, MS[31]#33733L, MS[32]#33734L, MS[33]#33735L, MS[34]#33736L, MS[35]#33737L, MS[36]#33738L, MS[37]#33739L, MS[38]#33740L, MS[39]#33741L, MS[40]#33742L, MS[41]#33743L, MS[42]#33744L, MS[43]#33745L, MS[44]#33746L, MS[45]#33747L, MS[46]#33748L, MS[47]#33749L, MS[48]#33750L, MS[49]#33751L, MS[50]#33752L, MS[51]#33753L, sum#33868L, sum#33869, sum#33870, count#33871L]
Keys [2]: [segment#33635, processing_day#33637]
Functions [5]: [count(1), approx_count_distinct(customer_id#33631L, 0.05, 0, 0), sum(events#33641), sum(weighted_amount#33643), avg(amount#33639)]
Aggregate Attributes [5]: [count(1)#33649L, approx_count_distinct(customer_id#33631L, 0.05, 0, 0)#33754L, sum(events#33641)#33755L, sum(weighted_amount#33643)#33756, avg(amount#33639)#33757]
Results [7]: [segment#33635, processing_day#33637, count(1)#33649L AS row_count#33644L, approx_count_distinct(customer_id#33631L, 0.05, 0, 0)#33754L AS unique_customers#33645L, sum(events#33641)#33755L AS event_sum#33646L, sum(weighted_amount#33643)#33756 AS weighted_amount_sum#33647, avg(amount#33639)#33757 AS avg_amount#33648]
(17) Exchange
Input [7]: [segment#33635, processing_day#33637, row_count#33644L, unique_customers#33645L, event_sum#33646L, weighted_amount_sum#33647, avg_amount#33648]
Arguments: rangepartitioning(segment#33635 ASC NULLS FIRST, processing_day#33637 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=3186]
(18) Sort
Input [7]: [segment#33635, processing_day#33637, row_count#33644L, unique_customers#33645L, event_sum#33646L, weighted_amount_sum#33647, avg_amount#33648]
Arguments: [segment#33635 ASC NULLS FIRST, processing_day#33637 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#33635, processing_day#33637, row_count#33644L, unique_customers#33645L, event_sum#33646L, weighted_amount_sum#33647, avg_amount#33648]
Arguments: isFinalPlan=true