== 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#75245L]
Arguments: Range (13000000, 14000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#75245L % 250000) AS customer_id#75247L, concat(segment-, cast(cast((id#75245L % 12) as int) as string)) AS segment#75251, cast((id#75245L % 14) as int) AS processing_day#75253, ((cast(((id#75245L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#75255, cast((((id#75245L * 29) % 7) + 1) as int) AS events#75257]
Input [1]: [id#75245L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#75247L, segment#75251, processing_day#75253, amount#75255, events#75257, (amount#75255 * cast(events#75257 as double)) AS weighted_amount#75259]
Input [5]: [customer_id#75247L, segment#75251, processing_day#75253, amount#75255, events#75257]
(4) HashAggregate
Input [6]: [customer_id#75247L, segment#75251, processing_day#75253, amount#75255, events#75257, weighted_amount#75259]
Keys [2]: [segment#75251, processing_day#75253]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#75247L, 0.05, 0, 0), partial_sum(events#75257), partial_sum(weighted_amount#75259), partial_avg(amount#75255)]
Aggregate Attributes [57]: [count#75478L, MS[0]#75266L, MS[1]#75267L, MS[2]#75268L, MS[3]#75269L, MS[4]#75270L, MS[5]#75271L, MS[6]#75272L, MS[7]#75273L, MS[8]#75274L, MS[9]#75275L, MS[10]#75276L, MS[11]#75277L, MS[12]#75278L, MS[13]#75279L, MS[14]#75280L, MS[15]#75281L, MS[16]#75282L, MS[17]#75283L, MS[18]#75284L, MS[19]#75285L, MS[20]#75286L, MS[21]#75287L, MS[22]#75288L, MS[23]#75289L, MS[24]#75290L, MS[25]#75291L, MS[26]#75292L, MS[27]#75293L, MS[28]#75294L, MS[29]#75295L, MS[30]#75296L, MS[31]#75297L, MS[32]#75298L, MS[33]#75299L, MS[34]#75300L, MS[35]#75301L, MS[36]#75302L, MS[37]#75303L, MS[38]#75304L, MS[39]#75305L, MS[40]#75306L, MS[41]#75307L, MS[42]#75308L, MS[43]#75309L, MS[44]#75310L, MS[45]#75311L, MS[46]#75312L, MS[47]#75313L, MS[48]#75314L, MS[49]#75315L, MS[50]#75316L, MS[51]#75317L, sum#75479L, sum#75480, sum#75481, count#75482L]
Results [59]: [segment#75251, processing_day#75253, count#75483L, MS[0]#75318L, MS[1]#75319L, MS[2]#75320L, MS[3]#75321L, MS[4]#75322L, MS[5]#75323L, MS[6]#75324L, MS[7]#75325L, MS[8]#75326L, MS[9]#75327L, MS[10]#75328L, MS[11]#75329L, MS[12]#75330L, MS[13]#75331L, MS[14]#75332L, MS[15]#75333L, MS[16]#75334L, MS[17]#75335L, MS[18]#75336L, MS[19]#75337L, MS[20]#75338L, MS[21]#75339L, MS[22]#75340L, MS[23]#75341L, MS[24]#75342L, MS[25]#75343L, MS[26]#75344L, MS[27]#75345L, MS[28]#75346L, MS[29]#75347L, MS[30]#75348L, MS[31]#75349L, MS[32]#75350L, MS[33]#75351L, MS[34]#75352L, MS[35]#75353L, MS[36]#75354L, MS[37]#75355L, MS[38]#75356L, MS[39]#75357L, MS[40]#75358L, MS[41]#75359L, MS[42]#75360L, MS[43]#75361L, MS[44]#75362L, MS[45]#75363L, MS[46]#75364L, MS[47]#75365L, MS[48]#75366L, MS[49]#75367L, MS[50]#75368L, MS[51]#75369L, sum#75484L, sum#75485, sum#75486, count#75487L]
(5) Exchange
Input [59]: [segment#75251, processing_day#75253, count#75483L, MS[0]#75318L, MS[1]#75319L, MS[2]#75320L, MS[3]#75321L, MS[4]#75322L, MS[5]#75323L, MS[6]#75324L, MS[7]#75325L, MS[8]#75326L, MS[9]#75327L, MS[10]#75328L, MS[11]#75329L, MS[12]#75330L, MS[13]#75331L, MS[14]#75332L, MS[15]#75333L, MS[16]#75334L, MS[17]#75335L, MS[18]#75336L, MS[19]#75337L, MS[20]#75338L, MS[21]#75339L, MS[22]#75340L, MS[23]#75341L, MS[24]#75342L, MS[25]#75343L, MS[26]#75344L, MS[27]#75345L, MS[28]#75346L, MS[29]#75347L, MS[30]#75348L, MS[31]#75349L, MS[32]#75350L, MS[33]#75351L, MS[34]#75352L, MS[35]#75353L, MS[36]#75354L, MS[37]#75355L, MS[38]#75356L, MS[39]#75357L, MS[40]#75358L, MS[41]#75359L, MS[42]#75360L, MS[43]#75361L, MS[44]#75362L, MS[45]#75363L, MS[46]#75364L, MS[47]#75365L, MS[48]#75366L, MS[49]#75367L, MS[50]#75368L, MS[51]#75369L, sum#75484L, sum#75485, sum#75486, count#75487L]
Arguments: hashpartitioning(segment#75251, processing_day#75253, 200), ENSURE_REQUIREMENTS, [plan_id=7116]
(6) ShuffleQueryStage
Output [59]: [segment#75251, processing_day#75253, count#75483L, MS[0]#75318L, MS[1]#75319L, MS[2]#75320L, MS[3]#75321L, MS[4]#75322L, MS[5]#75323L, MS[6]#75324L, MS[7]#75325L, MS[8]#75326L, MS[9]#75327L, MS[10]#75328L, MS[11]#75329L, MS[12]#75330L, MS[13]#75331L, MS[14]#75332L, MS[15]#75333L, MS[16]#75334L, MS[17]#75335L, MS[18]#75336L, MS[19]#75337L, MS[20]#75338L, MS[21]#75339L, MS[22]#75340L, MS[23]#75341L, MS[24]#75342L, MS[25]#75343L, MS[26]#75344L, MS[27]#75345L, MS[28]#75346L, MS[29]#75347L, MS[30]#75348L, MS[31]#75349L, MS[32]#75350L, MS[33]#75351L, MS[34]#75352L, MS[35]#75353L, MS[36]#75354L, MS[37]#75355L, MS[38]#75356L, MS[39]#75357L, MS[40]#75358L, MS[41]#75359L, MS[42]#75360L, MS[43]#75361L, MS[44]#75362L, MS[45]#75363L, MS[46]#75364L, MS[47]#75365L, MS[48]#75366L, MS[49]#75367L, MS[50]#75368L, MS[51]#75369L, sum#75484L, sum#75485, sum#75486, count#75487L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#75251, processing_day#75253, count#75483L, MS[0]#75318L, MS[1]#75319L, MS[2]#75320L, MS[3]#75321L, MS[4]#75322L, MS[5]#75323L, MS[6]#75324L, MS[7]#75325L, MS[8]#75326L, MS[9]#75327L, MS[10]#75328L, MS[11]#75329L, MS[12]#75330L, MS[13]#75331L, MS[14]#75332L, MS[15]#75333L, MS[16]#75334L, MS[17]#75335L, MS[18]#75336L, MS[19]#75337L, MS[20]#75338L, MS[21]#75339L, MS[22]#75340L, MS[23]#75341L, MS[24]#75342L, MS[25]#75343L, MS[26]#75344L, MS[27]#75345L, MS[28]#75346L, MS[29]#75347L, MS[30]#75348L, MS[31]#75349L, MS[32]#75350L, MS[33]#75351L, MS[34]#75352L, MS[35]#75353L, MS[36]#75354L, MS[37]#75355L, MS[38]#75356L, MS[39]#75357L, MS[40]#75358L, MS[41]#75359L, MS[42]#75360L, MS[43]#75361L, MS[44]#75362L, MS[45]#75363L, MS[46]#75364L, MS[47]#75365L, MS[48]#75366L, MS[49]#75367L, MS[50]#75368L, MS[51]#75369L, sum#75484L, sum#75485, sum#75486, count#75487L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#75251, processing_day#75253, count#75483L, MS[0]#75318L, MS[1]#75319L, MS[2]#75320L, MS[3]#75321L, MS[4]#75322L, MS[5]#75323L, MS[6]#75324L, MS[7]#75325L, MS[8]#75326L, MS[9]#75327L, MS[10]#75328L, MS[11]#75329L, MS[12]#75330L, MS[13]#75331L, MS[14]#75332L, MS[15]#75333L, MS[16]#75334L, MS[17]#75335L, MS[18]#75336L, MS[19]#75337L, MS[20]#75338L, MS[21]#75339L, MS[22]#75340L, MS[23]#75341L, MS[24]#75342L, MS[25]#75343L, MS[26]#75344L, MS[27]#75345L, MS[28]#75346L, MS[29]#75347L, MS[30]#75348L, MS[31]#75349L, MS[32]#75350L, MS[33]#75351L, MS[34]#75352L, MS[35]#75353L, MS[36]#75354L, MS[37]#75355L, MS[38]#75356L, MS[39]#75357L, MS[40]#75358L, MS[41]#75359L, MS[42]#75360L, MS[43]#75361L, MS[44]#75362L, MS[45]#75363L, MS[46]#75364L, MS[47]#75365L, MS[48]#75366L, MS[49]#75367L, MS[50]#75368L, MS[51]#75369L, sum#75484L, sum#75485, sum#75486, count#75487L]
Keys [2]: [segment#75251, processing_day#75253]
Functions [5]: [count(1), approx_count_distinct(customer_id#75247L, 0.05, 0, 0), sum(events#75257), sum(weighted_amount#75259), avg(amount#75255)]
Aggregate Attributes [5]: [count(1)#75265L, approx_count_distinct(customer_id#75247L, 0.05, 0, 0)#75370L, sum(events#75257)#75371L, sum(weighted_amount#75259)#75372, avg(amount#75255)#75373]
Results [7]: [segment#75251, processing_day#75253, count(1)#75265L AS row_count#75260L, approx_count_distinct(customer_id#75247L, 0.05, 0, 0)#75370L AS unique_customers#75261L, sum(events#75257)#75371L AS event_sum#75262L, sum(weighted_amount#75259)#75372 AS weighted_amount_sum#75263, avg(amount#75255)#75373 AS avg_amount#75264]
(9) Exchange
Input [7]: [segment#75251, processing_day#75253, row_count#75260L, unique_customers#75261L, event_sum#75262L, weighted_amount_sum#75263, avg_amount#75264]
Arguments: rangepartitioning(segment#75251 ASC NULLS FIRST, processing_day#75253 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=7138]
(10) ShuffleQueryStage
Output [7]: [segment#75251, processing_day#75253, row_count#75260L, unique_customers#75261L, event_sum#75262L, weighted_amount_sum#75263, avg_amount#75264]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#75251, processing_day#75253, row_count#75260L, unique_customers#75261L, event_sum#75262L, weighted_amount_sum#75263, avg_amount#75264]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#75251, processing_day#75253, row_count#75260L, unique_customers#75261L, event_sum#75262L, weighted_amount_sum#75263, avg_amount#75264]
Arguments: [segment#75251 ASC NULLS FIRST, processing_day#75253 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#75251, processing_day#75253, row_count#75260L, unique_customers#75261L, event_sum#75262L, weighted_amount_sum#75263, avg_amount#75264]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#75247L, segment#75251, processing_day#75253, amount#75255, events#75257, weighted_amount#75259]
Keys [2]: [segment#75251, processing_day#75253]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#75247L, 0.05, 0, 0), partial_sum(events#75257), partial_sum(weighted_amount#75259), partial_avg(amount#75255)]
Aggregate Attributes [57]: [count#75478L, MS[0]#75266L, MS[1]#75267L, MS[2]#75268L, MS[3]#75269L, MS[4]#75270L, MS[5]#75271L, MS[6]#75272L, MS[7]#75273L, MS[8]#75274L, MS[9]#75275L, MS[10]#75276L, MS[11]#75277L, MS[12]#75278L, MS[13]#75279L, MS[14]#75280L, MS[15]#75281L, MS[16]#75282L, MS[17]#75283L, MS[18]#75284L, MS[19]#75285L, MS[20]#75286L, MS[21]#75287L, MS[22]#75288L, MS[23]#75289L, MS[24]#75290L, MS[25]#75291L, MS[26]#75292L, MS[27]#75293L, MS[28]#75294L, MS[29]#75295L, MS[30]#75296L, MS[31]#75297L, MS[32]#75298L, MS[33]#75299L, MS[34]#75300L, MS[35]#75301L, MS[36]#75302L, MS[37]#75303L, MS[38]#75304L, MS[39]#75305L, MS[40]#75306L, MS[41]#75307L, MS[42]#75308L, MS[43]#75309L, MS[44]#75310L, MS[45]#75311L, MS[46]#75312L, MS[47]#75313L, MS[48]#75314L, MS[49]#75315L, MS[50]#75316L, MS[51]#75317L, sum#75479L, sum#75480, sum#75481, count#75482L]
Results [59]: [segment#75251, processing_day#75253, count#75483L, MS[0]#75318L, MS[1]#75319L, MS[2]#75320L, MS[3]#75321L, MS[4]#75322L, MS[5]#75323L, MS[6]#75324L, MS[7]#75325L, MS[8]#75326L, MS[9]#75327L, MS[10]#75328L, MS[11]#75329L, MS[12]#75330L, MS[13]#75331L, MS[14]#75332L, MS[15]#75333L, MS[16]#75334L, MS[17]#75335L, MS[18]#75336L, MS[19]#75337L, MS[20]#75338L, MS[21]#75339L, MS[22]#75340L, MS[23]#75341L, MS[24]#75342L, MS[25]#75343L, MS[26]#75344L, MS[27]#75345L, MS[28]#75346L, MS[29]#75347L, MS[30]#75348L, MS[31]#75349L, MS[32]#75350L, MS[33]#75351L, MS[34]#75352L, MS[35]#75353L, MS[36]#75354L, MS[37]#75355L, MS[38]#75356L, MS[39]#75357L, MS[40]#75358L, MS[41]#75359L, MS[42]#75360L, MS[43]#75361L, MS[44]#75362L, MS[45]#75363L, MS[46]#75364L, MS[47]#75365L, MS[48]#75366L, MS[49]#75367L, MS[50]#75368L, MS[51]#75369L, sum#75484L, sum#75485, sum#75486, count#75487L]
(15) Exchange
Input [59]: [segment#75251, processing_day#75253, count#75483L, MS[0]#75318L, MS[1]#75319L, MS[2]#75320L, MS[3]#75321L, MS[4]#75322L, MS[5]#75323L, MS[6]#75324L, MS[7]#75325L, MS[8]#75326L, MS[9]#75327L, MS[10]#75328L, MS[11]#75329L, MS[12]#75330L, MS[13]#75331L, MS[14]#75332L, MS[15]#75333L, MS[16]#75334L, MS[17]#75335L, MS[18]#75336L, MS[19]#75337L, MS[20]#75338L, MS[21]#75339L, MS[22]#75340L, MS[23]#75341L, MS[24]#75342L, MS[25]#75343L, MS[26]#75344L, MS[27]#75345L, MS[28]#75346L, MS[29]#75347L, MS[30]#75348L, MS[31]#75349L, MS[32]#75350L, MS[33]#75351L, MS[34]#75352L, MS[35]#75353L, MS[36]#75354L, MS[37]#75355L, MS[38]#75356L, MS[39]#75357L, MS[40]#75358L, MS[41]#75359L, MS[42]#75360L, MS[43]#75361L, MS[44]#75362L, MS[45]#75363L, MS[46]#75364L, MS[47]#75365L, MS[48]#75366L, MS[49]#75367L, MS[50]#75368L, MS[51]#75369L, sum#75484L, sum#75485, sum#75486, count#75487L]
Arguments: hashpartitioning(segment#75251, processing_day#75253, 200), ENSURE_REQUIREMENTS, [plan_id=7096]
(16) HashAggregate
Input [59]: [segment#75251, processing_day#75253, count#75483L, MS[0]#75318L, MS[1]#75319L, MS[2]#75320L, MS[3]#75321L, MS[4]#75322L, MS[5]#75323L, MS[6]#75324L, MS[7]#75325L, MS[8]#75326L, MS[9]#75327L, MS[10]#75328L, MS[11]#75329L, MS[12]#75330L, MS[13]#75331L, MS[14]#75332L, MS[15]#75333L, MS[16]#75334L, MS[17]#75335L, MS[18]#75336L, MS[19]#75337L, MS[20]#75338L, MS[21]#75339L, MS[22]#75340L, MS[23]#75341L, MS[24]#75342L, MS[25]#75343L, MS[26]#75344L, MS[27]#75345L, MS[28]#75346L, MS[29]#75347L, MS[30]#75348L, MS[31]#75349L, MS[32]#75350L, MS[33]#75351L, MS[34]#75352L, MS[35]#75353L, MS[36]#75354L, MS[37]#75355L, MS[38]#75356L, MS[39]#75357L, MS[40]#75358L, MS[41]#75359L, MS[42]#75360L, MS[43]#75361L, MS[44]#75362L, MS[45]#75363L, MS[46]#75364L, MS[47]#75365L, MS[48]#75366L, MS[49]#75367L, MS[50]#75368L, MS[51]#75369L, sum#75484L, sum#75485, sum#75486, count#75487L]
Keys [2]: [segment#75251, processing_day#75253]
Functions [5]: [count(1), approx_count_distinct(customer_id#75247L, 0.05, 0, 0), sum(events#75257), sum(weighted_amount#75259), avg(amount#75255)]
Aggregate Attributes [5]: [count(1)#75265L, approx_count_distinct(customer_id#75247L, 0.05, 0, 0)#75370L, sum(events#75257)#75371L, sum(weighted_amount#75259)#75372, avg(amount#75255)#75373]
Results [7]: [segment#75251, processing_day#75253, count(1)#75265L AS row_count#75260L, approx_count_distinct(customer_id#75247L, 0.05, 0, 0)#75370L AS unique_customers#75261L, sum(events#75257)#75371L AS event_sum#75262L, sum(weighted_amount#75259)#75372 AS weighted_amount_sum#75263, avg(amount#75255)#75373 AS avg_amount#75264]
(17) Exchange
Input [7]: [segment#75251, processing_day#75253, row_count#75260L, unique_customers#75261L, event_sum#75262L, weighted_amount_sum#75263, avg_amount#75264]
Arguments: rangepartitioning(segment#75251 ASC NULLS FIRST, processing_day#75253 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=7099]
(18) Sort
Input [7]: [segment#75251, processing_day#75253, row_count#75260L, unique_customers#75261L, event_sum#75262L, weighted_amount_sum#75263, avg_amount#75264]
Arguments: [segment#75251 ASC NULLS FIRST, processing_day#75253 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#75251, processing_day#75253, row_count#75260L, unique_customers#75261L, event_sum#75262L, weighted_amount_sum#75263, avg_amount#75264]
Arguments: isFinalPlan=true