== 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#56647L]
Arguments: Range (16000000, 17000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#56647L % 250000) AS customer_id#56649L, concat(segment-, cast(cast((id#56647L % 12) as int) as string)) AS segment#56653, cast((id#56647L % 14) as int) AS processing_day#56655, ((cast(((id#56647L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#56657, cast((((id#56647L * 29) % 7) + 1) as int) AS events#56659]
Input [1]: [id#56647L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#56649L, segment#56653, processing_day#56655, amount#56657, events#56659, (amount#56657 * cast(events#56659 as double)) AS weighted_amount#56661]
Input [5]: [customer_id#56649L, segment#56653, processing_day#56655, amount#56657, events#56659]
(4) HashAggregate
Input [6]: [customer_id#56649L, segment#56653, processing_day#56655, amount#56657, events#56659, weighted_amount#56661]
Keys [2]: [segment#56653, processing_day#56655]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#56649L, 0.05, 0, 0), partial_sum(events#56659), partial_sum(weighted_amount#56661), partial_avg(amount#56657)]
Aggregate Attributes [57]: [count#56880L, MS[0]#56668L, MS[1]#56669L, MS[2]#56670L, MS[3]#56671L, MS[4]#56672L, MS[5]#56673L, MS[6]#56674L, MS[7]#56675L, MS[8]#56676L, MS[9]#56677L, MS[10]#56678L, MS[11]#56679L, MS[12]#56680L, MS[13]#56681L, MS[14]#56682L, MS[15]#56683L, MS[16]#56684L, MS[17]#56685L, MS[18]#56686L, MS[19]#56687L, MS[20]#56688L, MS[21]#56689L, MS[22]#56690L, MS[23]#56691L, MS[24]#56692L, MS[25]#56693L, MS[26]#56694L, MS[27]#56695L, MS[28]#56696L, MS[29]#56697L, MS[30]#56698L, MS[31]#56699L, MS[32]#56700L, MS[33]#56701L, MS[34]#56702L, MS[35]#56703L, MS[36]#56704L, MS[37]#56705L, MS[38]#56706L, MS[39]#56707L, MS[40]#56708L, MS[41]#56709L, MS[42]#56710L, MS[43]#56711L, MS[44]#56712L, MS[45]#56713L, MS[46]#56714L, MS[47]#56715L, MS[48]#56716L, MS[49]#56717L, MS[50]#56718L, MS[51]#56719L, sum#56881L, sum#56882, sum#56883, count#56884L]
Results [59]: [segment#56653, processing_day#56655, count#56885L, MS[0]#56720L, MS[1]#56721L, MS[2]#56722L, MS[3]#56723L, MS[4]#56724L, MS[5]#56725L, MS[6]#56726L, MS[7]#56727L, MS[8]#56728L, MS[9]#56729L, MS[10]#56730L, MS[11]#56731L, MS[12]#56732L, MS[13]#56733L, MS[14]#56734L, MS[15]#56735L, MS[16]#56736L, MS[17]#56737L, MS[18]#56738L, MS[19]#56739L, MS[20]#56740L, MS[21]#56741L, MS[22]#56742L, MS[23]#56743L, MS[24]#56744L, MS[25]#56745L, MS[26]#56746L, MS[27]#56747L, MS[28]#56748L, MS[29]#56749L, MS[30]#56750L, MS[31]#56751L, MS[32]#56752L, MS[33]#56753L, MS[34]#56754L, MS[35]#56755L, MS[36]#56756L, MS[37]#56757L, MS[38]#56758L, MS[39]#56759L, MS[40]#56760L, MS[41]#56761L, MS[42]#56762L, MS[43]#56763L, MS[44]#56764L, MS[45]#56765L, MS[46]#56766L, MS[47]#56767L, MS[48]#56768L, MS[49]#56769L, MS[50]#56770L, MS[51]#56771L, sum#56886L, sum#56887, sum#56888, count#56889L]
(5) Exchange
Input [59]: [segment#56653, processing_day#56655, count#56885L, MS[0]#56720L, MS[1]#56721L, MS[2]#56722L, MS[3]#56723L, MS[4]#56724L, MS[5]#56725L, MS[6]#56726L, MS[7]#56727L, MS[8]#56728L, MS[9]#56729L, MS[10]#56730L, MS[11]#56731L, MS[12]#56732L, MS[13]#56733L, MS[14]#56734L, MS[15]#56735L, MS[16]#56736L, MS[17]#56737L, MS[18]#56738L, MS[19]#56739L, MS[20]#56740L, MS[21]#56741L, MS[22]#56742L, MS[23]#56743L, MS[24]#56744L, MS[25]#56745L, MS[26]#56746L, MS[27]#56747L, MS[28]#56748L, MS[29]#56749L, MS[30]#56750L, MS[31]#56751L, MS[32]#56752L, MS[33]#56753L, MS[34]#56754L, MS[35]#56755L, MS[36]#56756L, MS[37]#56757L, MS[38]#56758L, MS[39]#56759L, MS[40]#56760L, MS[41]#56761L, MS[42]#56762L, MS[43]#56763L, MS[44]#56764L, MS[45]#56765L, MS[46]#56766L, MS[47]#56767L, MS[48]#56768L, MS[49]#56769L, MS[50]#56770L, MS[51]#56771L, sum#56886L, sum#56887, sum#56888, count#56889L]
Arguments: hashpartitioning(segment#56653, processing_day#56655, 200), ENSURE_REQUIREMENTS, [plan_id=5367]
(6) ShuffleQueryStage
Output [59]: [segment#56653, processing_day#56655, count#56885L, MS[0]#56720L, MS[1]#56721L, MS[2]#56722L, MS[3]#56723L, MS[4]#56724L, MS[5]#56725L, MS[6]#56726L, MS[7]#56727L, MS[8]#56728L, MS[9]#56729L, MS[10]#56730L, MS[11]#56731L, MS[12]#56732L, MS[13]#56733L, MS[14]#56734L, MS[15]#56735L, MS[16]#56736L, MS[17]#56737L, MS[18]#56738L, MS[19]#56739L, MS[20]#56740L, MS[21]#56741L, MS[22]#56742L, MS[23]#56743L, MS[24]#56744L, MS[25]#56745L, MS[26]#56746L, MS[27]#56747L, MS[28]#56748L, MS[29]#56749L, MS[30]#56750L, MS[31]#56751L, MS[32]#56752L, MS[33]#56753L, MS[34]#56754L, MS[35]#56755L, MS[36]#56756L, MS[37]#56757L, MS[38]#56758L, MS[39]#56759L, MS[40]#56760L, MS[41]#56761L, MS[42]#56762L, MS[43]#56763L, MS[44]#56764L, MS[45]#56765L, MS[46]#56766L, MS[47]#56767L, MS[48]#56768L, MS[49]#56769L, MS[50]#56770L, MS[51]#56771L, sum#56886L, sum#56887, sum#56888, count#56889L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#56653, processing_day#56655, count#56885L, MS[0]#56720L, MS[1]#56721L, MS[2]#56722L, MS[3]#56723L, MS[4]#56724L, MS[5]#56725L, MS[6]#56726L, MS[7]#56727L, MS[8]#56728L, MS[9]#56729L, MS[10]#56730L, MS[11]#56731L, MS[12]#56732L, MS[13]#56733L, MS[14]#56734L, MS[15]#56735L, MS[16]#56736L, MS[17]#56737L, MS[18]#56738L, MS[19]#56739L, MS[20]#56740L, MS[21]#56741L, MS[22]#56742L, MS[23]#56743L, MS[24]#56744L, MS[25]#56745L, MS[26]#56746L, MS[27]#56747L, MS[28]#56748L, MS[29]#56749L, MS[30]#56750L, MS[31]#56751L, MS[32]#56752L, MS[33]#56753L, MS[34]#56754L, MS[35]#56755L, MS[36]#56756L, MS[37]#56757L, MS[38]#56758L, MS[39]#56759L, MS[40]#56760L, MS[41]#56761L, MS[42]#56762L, MS[43]#56763L, MS[44]#56764L, MS[45]#56765L, MS[46]#56766L, MS[47]#56767L, MS[48]#56768L, MS[49]#56769L, MS[50]#56770L, MS[51]#56771L, sum#56886L, sum#56887, sum#56888, count#56889L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#56653, processing_day#56655, count#56885L, MS[0]#56720L, MS[1]#56721L, MS[2]#56722L, MS[3]#56723L, MS[4]#56724L, MS[5]#56725L, MS[6]#56726L, MS[7]#56727L, MS[8]#56728L, MS[9]#56729L, MS[10]#56730L, MS[11]#56731L, MS[12]#56732L, MS[13]#56733L, MS[14]#56734L, MS[15]#56735L, MS[16]#56736L, MS[17]#56737L, MS[18]#56738L, MS[19]#56739L, MS[20]#56740L, MS[21]#56741L, MS[22]#56742L, MS[23]#56743L, MS[24]#56744L, MS[25]#56745L, MS[26]#56746L, MS[27]#56747L, MS[28]#56748L, MS[29]#56749L, MS[30]#56750L, MS[31]#56751L, MS[32]#56752L, MS[33]#56753L, MS[34]#56754L, MS[35]#56755L, MS[36]#56756L, MS[37]#56757L, MS[38]#56758L, MS[39]#56759L, MS[40]#56760L, MS[41]#56761L, MS[42]#56762L, MS[43]#56763L, MS[44]#56764L, MS[45]#56765L, MS[46]#56766L, MS[47]#56767L, MS[48]#56768L, MS[49]#56769L, MS[50]#56770L, MS[51]#56771L, sum#56886L, sum#56887, sum#56888, count#56889L]
Keys [2]: [segment#56653, processing_day#56655]
Functions [5]: [count(1), approx_count_distinct(customer_id#56649L, 0.05, 0, 0), sum(events#56659), sum(weighted_amount#56661), avg(amount#56657)]
Aggregate Attributes [5]: [count(1)#56667L, approx_count_distinct(customer_id#56649L, 0.05, 0, 0)#56772L, sum(events#56659)#56773L, sum(weighted_amount#56661)#56774, avg(amount#56657)#56775]
Results [7]: [segment#56653, processing_day#56655, count(1)#56667L AS row_count#56662L, approx_count_distinct(customer_id#56649L, 0.05, 0, 0)#56772L AS unique_customers#56663L, sum(events#56659)#56773L AS event_sum#56664L, sum(weighted_amount#56661)#56774 AS weighted_amount_sum#56665, avg(amount#56657)#56775 AS avg_amount#56666]
(9) Exchange
Input [7]: [segment#56653, processing_day#56655, row_count#56662L, unique_customers#56663L, event_sum#56664L, weighted_amount_sum#56665, avg_amount#56666]
Arguments: rangepartitioning(segment#56653 ASC NULLS FIRST, processing_day#56655 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=5389]
(10) ShuffleQueryStage
Output [7]: [segment#56653, processing_day#56655, row_count#56662L, unique_customers#56663L, event_sum#56664L, weighted_amount_sum#56665, avg_amount#56666]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#56653, processing_day#56655, row_count#56662L, unique_customers#56663L, event_sum#56664L, weighted_amount_sum#56665, avg_amount#56666]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#56653, processing_day#56655, row_count#56662L, unique_customers#56663L, event_sum#56664L, weighted_amount_sum#56665, avg_amount#56666]
Arguments: [segment#56653 ASC NULLS FIRST, processing_day#56655 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#56653, processing_day#56655, row_count#56662L, unique_customers#56663L, event_sum#56664L, weighted_amount_sum#56665, avg_amount#56666]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#56649L, segment#56653, processing_day#56655, amount#56657, events#56659, weighted_amount#56661]
Keys [2]: [segment#56653, processing_day#56655]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#56649L, 0.05, 0, 0), partial_sum(events#56659), partial_sum(weighted_amount#56661), partial_avg(amount#56657)]
Aggregate Attributes [57]: [count#56880L, MS[0]#56668L, MS[1]#56669L, MS[2]#56670L, MS[3]#56671L, MS[4]#56672L, MS[5]#56673L, MS[6]#56674L, MS[7]#56675L, MS[8]#56676L, MS[9]#56677L, MS[10]#56678L, MS[11]#56679L, MS[12]#56680L, MS[13]#56681L, MS[14]#56682L, MS[15]#56683L, MS[16]#56684L, MS[17]#56685L, MS[18]#56686L, MS[19]#56687L, MS[20]#56688L, MS[21]#56689L, MS[22]#56690L, MS[23]#56691L, MS[24]#56692L, MS[25]#56693L, MS[26]#56694L, MS[27]#56695L, MS[28]#56696L, MS[29]#56697L, MS[30]#56698L, MS[31]#56699L, MS[32]#56700L, MS[33]#56701L, MS[34]#56702L, MS[35]#56703L, MS[36]#56704L, MS[37]#56705L, MS[38]#56706L, MS[39]#56707L, MS[40]#56708L, MS[41]#56709L, MS[42]#56710L, MS[43]#56711L, MS[44]#56712L, MS[45]#56713L, MS[46]#56714L, MS[47]#56715L, MS[48]#56716L, MS[49]#56717L, MS[50]#56718L, MS[51]#56719L, sum#56881L, sum#56882, sum#56883, count#56884L]
Results [59]: [segment#56653, processing_day#56655, count#56885L, MS[0]#56720L, MS[1]#56721L, MS[2]#56722L, MS[3]#56723L, MS[4]#56724L, MS[5]#56725L, MS[6]#56726L, MS[7]#56727L, MS[8]#56728L, MS[9]#56729L, MS[10]#56730L, MS[11]#56731L, MS[12]#56732L, MS[13]#56733L, MS[14]#56734L, MS[15]#56735L, MS[16]#56736L, MS[17]#56737L, MS[18]#56738L, MS[19]#56739L, MS[20]#56740L, MS[21]#56741L, MS[22]#56742L, MS[23]#56743L, MS[24]#56744L, MS[25]#56745L, MS[26]#56746L, MS[27]#56747L, MS[28]#56748L, MS[29]#56749L, MS[30]#56750L, MS[31]#56751L, MS[32]#56752L, MS[33]#56753L, MS[34]#56754L, MS[35]#56755L, MS[36]#56756L, MS[37]#56757L, MS[38]#56758L, MS[39]#56759L, MS[40]#56760L, MS[41]#56761L, MS[42]#56762L, MS[43]#56763L, MS[44]#56764L, MS[45]#56765L, MS[46]#56766L, MS[47]#56767L, MS[48]#56768L, MS[49]#56769L, MS[50]#56770L, MS[51]#56771L, sum#56886L, sum#56887, sum#56888, count#56889L]
(15) Exchange
Input [59]: [segment#56653, processing_day#56655, count#56885L, MS[0]#56720L, MS[1]#56721L, MS[2]#56722L, MS[3]#56723L, MS[4]#56724L, MS[5]#56725L, MS[6]#56726L, MS[7]#56727L, MS[8]#56728L, MS[9]#56729L, MS[10]#56730L, MS[11]#56731L, MS[12]#56732L, MS[13]#56733L, MS[14]#56734L, MS[15]#56735L, MS[16]#56736L, MS[17]#56737L, MS[18]#56738L, MS[19]#56739L, MS[20]#56740L, MS[21]#56741L, MS[22]#56742L, MS[23]#56743L, MS[24]#56744L, MS[25]#56745L, MS[26]#56746L, MS[27]#56747L, MS[28]#56748L, MS[29]#56749L, MS[30]#56750L, MS[31]#56751L, MS[32]#56752L, MS[33]#56753L, MS[34]#56754L, MS[35]#56755L, MS[36]#56756L, MS[37]#56757L, MS[38]#56758L, MS[39]#56759L, MS[40]#56760L, MS[41]#56761L, MS[42]#56762L, MS[43]#56763L, MS[44]#56764L, MS[45]#56765L, MS[46]#56766L, MS[47]#56767L, MS[48]#56768L, MS[49]#56769L, MS[50]#56770L, MS[51]#56771L, sum#56886L, sum#56887, sum#56888, count#56889L]
Arguments: hashpartitioning(segment#56653, processing_day#56655, 200), ENSURE_REQUIREMENTS, [plan_id=5347]
(16) HashAggregate
Input [59]: [segment#56653, processing_day#56655, count#56885L, MS[0]#56720L, MS[1]#56721L, MS[2]#56722L, MS[3]#56723L, MS[4]#56724L, MS[5]#56725L, MS[6]#56726L, MS[7]#56727L, MS[8]#56728L, MS[9]#56729L, MS[10]#56730L, MS[11]#56731L, MS[12]#56732L, MS[13]#56733L, MS[14]#56734L, MS[15]#56735L, MS[16]#56736L, MS[17]#56737L, MS[18]#56738L, MS[19]#56739L, MS[20]#56740L, MS[21]#56741L, MS[22]#56742L, MS[23]#56743L, MS[24]#56744L, MS[25]#56745L, MS[26]#56746L, MS[27]#56747L, MS[28]#56748L, MS[29]#56749L, MS[30]#56750L, MS[31]#56751L, MS[32]#56752L, MS[33]#56753L, MS[34]#56754L, MS[35]#56755L, MS[36]#56756L, MS[37]#56757L, MS[38]#56758L, MS[39]#56759L, MS[40]#56760L, MS[41]#56761L, MS[42]#56762L, MS[43]#56763L, MS[44]#56764L, MS[45]#56765L, MS[46]#56766L, MS[47]#56767L, MS[48]#56768L, MS[49]#56769L, MS[50]#56770L, MS[51]#56771L, sum#56886L, sum#56887, sum#56888, count#56889L]
Keys [2]: [segment#56653, processing_day#56655]
Functions [5]: [count(1), approx_count_distinct(customer_id#56649L, 0.05, 0, 0), sum(events#56659), sum(weighted_amount#56661), avg(amount#56657)]
Aggregate Attributes [5]: [count(1)#56667L, approx_count_distinct(customer_id#56649L, 0.05, 0, 0)#56772L, sum(events#56659)#56773L, sum(weighted_amount#56661)#56774, avg(amount#56657)#56775]
Results [7]: [segment#56653, processing_day#56655, count(1)#56667L AS row_count#56662L, approx_count_distinct(customer_id#56649L, 0.05, 0, 0)#56772L AS unique_customers#56663L, sum(events#56659)#56773L AS event_sum#56664L, sum(weighted_amount#56661)#56774 AS weighted_amount_sum#56665, avg(amount#56657)#56775 AS avg_amount#56666]
(17) Exchange
Input [7]: [segment#56653, processing_day#56655, row_count#56662L, unique_customers#56663L, event_sum#56664L, weighted_amount_sum#56665, avg_amount#56666]
Arguments: rangepartitioning(segment#56653 ASC NULLS FIRST, processing_day#56655 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=5350]
(18) Sort
Input [7]: [segment#56653, processing_day#56655, row_count#56662L, unique_customers#56663L, event_sum#56664L, weighted_amount_sum#56665, avg_amount#56666]
Arguments: [segment#56653 ASC NULLS FIRST, processing_day#56655 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#56653, processing_day#56655, row_count#56662L, unique_customers#56663L, event_sum#56664L, weighted_amount_sum#56665, avg_amount#56666]
Arguments: isFinalPlan=true