== 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#83201L]
Arguments: Range (22000000, 23000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#83201L % 250000) AS customer_id#83203L, concat(segment-, cast(cast((id#83201L % 12) as int) as string)) AS segment#83207, cast((id#83201L % 14) as int) AS processing_day#83209, ((cast(((id#83201L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#83211, cast((((id#83201L * 29) % 7) + 1) as int) AS events#83213]
Input [1]: [id#83201L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#83203L, segment#83207, processing_day#83209, amount#83211, events#83213, (amount#83211 * cast(events#83213 as double)) AS weighted_amount#83215]
Input [5]: [customer_id#83203L, segment#83207, processing_day#83209, amount#83211, events#83213]
(4) HashAggregate
Input [6]: [customer_id#83203L, segment#83207, processing_day#83209, amount#83211, events#83213, weighted_amount#83215]
Keys [2]: [segment#83207, processing_day#83209]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#83203L, 0.05, 0, 0), partial_sum(events#83213), partial_sum(weighted_amount#83215), partial_avg(amount#83211)]
Aggregate Attributes [57]: [count#83434L, MS[0]#83222L, MS[1]#83223L, MS[2]#83224L, MS[3]#83225L, MS[4]#83226L, MS[5]#83227L, MS[6]#83228L, MS[7]#83229L, MS[8]#83230L, MS[9]#83231L, MS[10]#83232L, MS[11]#83233L, MS[12]#83234L, MS[13]#83235L, MS[14]#83236L, MS[15]#83237L, MS[16]#83238L, MS[17]#83239L, MS[18]#83240L, MS[19]#83241L, MS[20]#83242L, MS[21]#83243L, MS[22]#83244L, MS[23]#83245L, MS[24]#83246L, MS[25]#83247L, MS[26]#83248L, MS[27]#83249L, MS[28]#83250L, MS[29]#83251L, MS[30]#83252L, MS[31]#83253L, MS[32]#83254L, MS[33]#83255L, MS[34]#83256L, MS[35]#83257L, MS[36]#83258L, MS[37]#83259L, MS[38]#83260L, MS[39]#83261L, MS[40]#83262L, MS[41]#83263L, MS[42]#83264L, MS[43]#83265L, MS[44]#83266L, MS[45]#83267L, MS[46]#83268L, MS[47]#83269L, MS[48]#83270L, MS[49]#83271L, MS[50]#83272L, MS[51]#83273L, sum#83435L, sum#83436, sum#83437, count#83438L]
Results [59]: [segment#83207, processing_day#83209, count#83439L, MS[0]#83274L, MS[1]#83275L, MS[2]#83276L, MS[3]#83277L, MS[4]#83278L, MS[5]#83279L, MS[6]#83280L, MS[7]#83281L, MS[8]#83282L, MS[9]#83283L, MS[10]#83284L, MS[11]#83285L, MS[12]#83286L, MS[13]#83287L, MS[14]#83288L, MS[15]#83289L, MS[16]#83290L, MS[17]#83291L, MS[18]#83292L, MS[19]#83293L, MS[20]#83294L, MS[21]#83295L, MS[22]#83296L, MS[23]#83297L, MS[24]#83298L, MS[25]#83299L, MS[26]#83300L, MS[27]#83301L, MS[28]#83302L, MS[29]#83303L, MS[30]#83304L, MS[31]#83305L, MS[32]#83306L, MS[33]#83307L, MS[34]#83308L, MS[35]#83309L, MS[36]#83310L, MS[37]#83311L, MS[38]#83312L, MS[39]#83313L, MS[40]#83314L, MS[41]#83315L, MS[42]#83316L, MS[43]#83317L, MS[44]#83318L, MS[45]#83319L, MS[46]#83320L, MS[47]#83321L, MS[48]#83322L, MS[49]#83323L, MS[50]#83324L, MS[51]#83325L, sum#83440L, sum#83441, sum#83442, count#83443L]
(5) Exchange
Input [59]: [segment#83207, processing_day#83209, count#83439L, MS[0]#83274L, MS[1]#83275L, MS[2]#83276L, MS[3]#83277L, MS[4]#83278L, MS[5]#83279L, MS[6]#83280L, MS[7]#83281L, MS[8]#83282L, MS[9]#83283L, MS[10]#83284L, MS[11]#83285L, MS[12]#83286L, MS[13]#83287L, MS[14]#83288L, MS[15]#83289L, MS[16]#83290L, MS[17]#83291L, MS[18]#83292L, MS[19]#83293L, MS[20]#83294L, MS[21]#83295L, MS[22]#83296L, MS[23]#83297L, MS[24]#83298L, MS[25]#83299L, MS[26]#83300L, MS[27]#83301L, MS[28]#83302L, MS[29]#83303L, MS[30]#83304L, MS[31]#83305L, MS[32]#83306L, MS[33]#83307L, MS[34]#83308L, MS[35]#83309L, MS[36]#83310L, MS[37]#83311L, MS[38]#83312L, MS[39]#83313L, MS[40]#83314L, MS[41]#83315L, MS[42]#83316L, MS[43]#83317L, MS[44]#83318L, MS[45]#83319L, MS[46]#83320L, MS[47]#83321L, MS[48]#83322L, MS[49]#83323L, MS[50]#83324L, MS[51]#83325L, sum#83440L, sum#83441, sum#83442, count#83443L]
Arguments: hashpartitioning(segment#83207, processing_day#83209, 200), ENSURE_REQUIREMENTS, [plan_id=7863]
(6) ShuffleQueryStage
Output [59]: [segment#83207, processing_day#83209, count#83439L, MS[0]#83274L, MS[1]#83275L, MS[2]#83276L, MS[3]#83277L, MS[4]#83278L, MS[5]#83279L, MS[6]#83280L, MS[7]#83281L, MS[8]#83282L, MS[9]#83283L, MS[10]#83284L, MS[11]#83285L, MS[12]#83286L, MS[13]#83287L, MS[14]#83288L, MS[15]#83289L, MS[16]#83290L, MS[17]#83291L, MS[18]#83292L, MS[19]#83293L, MS[20]#83294L, MS[21]#83295L, MS[22]#83296L, MS[23]#83297L, MS[24]#83298L, MS[25]#83299L, MS[26]#83300L, MS[27]#83301L, MS[28]#83302L, MS[29]#83303L, MS[30]#83304L, MS[31]#83305L, MS[32]#83306L, MS[33]#83307L, MS[34]#83308L, MS[35]#83309L, MS[36]#83310L, MS[37]#83311L, MS[38]#83312L, MS[39]#83313L, MS[40]#83314L, MS[41]#83315L, MS[42]#83316L, MS[43]#83317L, MS[44]#83318L, MS[45]#83319L, MS[46]#83320L, MS[47]#83321L, MS[48]#83322L, MS[49]#83323L, MS[50]#83324L, MS[51]#83325L, sum#83440L, sum#83441, sum#83442, count#83443L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#83207, processing_day#83209, count#83439L, MS[0]#83274L, MS[1]#83275L, MS[2]#83276L, MS[3]#83277L, MS[4]#83278L, MS[5]#83279L, MS[6]#83280L, MS[7]#83281L, MS[8]#83282L, MS[9]#83283L, MS[10]#83284L, MS[11]#83285L, MS[12]#83286L, MS[13]#83287L, MS[14]#83288L, MS[15]#83289L, MS[16]#83290L, MS[17]#83291L, MS[18]#83292L, MS[19]#83293L, MS[20]#83294L, MS[21]#83295L, MS[22]#83296L, MS[23]#83297L, MS[24]#83298L, MS[25]#83299L, MS[26]#83300L, MS[27]#83301L, MS[28]#83302L, MS[29]#83303L, MS[30]#83304L, MS[31]#83305L, MS[32]#83306L, MS[33]#83307L, MS[34]#83308L, MS[35]#83309L, MS[36]#83310L, MS[37]#83311L, MS[38]#83312L, MS[39]#83313L, MS[40]#83314L, MS[41]#83315L, MS[42]#83316L, MS[43]#83317L, MS[44]#83318L, MS[45]#83319L, MS[46]#83320L, MS[47]#83321L, MS[48]#83322L, MS[49]#83323L, MS[50]#83324L, MS[51]#83325L, sum#83440L, sum#83441, sum#83442, count#83443L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#83207, processing_day#83209, count#83439L, MS[0]#83274L, MS[1]#83275L, MS[2]#83276L, MS[3]#83277L, MS[4]#83278L, MS[5]#83279L, MS[6]#83280L, MS[7]#83281L, MS[8]#83282L, MS[9]#83283L, MS[10]#83284L, MS[11]#83285L, MS[12]#83286L, MS[13]#83287L, MS[14]#83288L, MS[15]#83289L, MS[16]#83290L, MS[17]#83291L, MS[18]#83292L, MS[19]#83293L, MS[20]#83294L, MS[21]#83295L, MS[22]#83296L, MS[23]#83297L, MS[24]#83298L, MS[25]#83299L, MS[26]#83300L, MS[27]#83301L, MS[28]#83302L, MS[29]#83303L, MS[30]#83304L, MS[31]#83305L, MS[32]#83306L, MS[33]#83307L, MS[34]#83308L, MS[35]#83309L, MS[36]#83310L, MS[37]#83311L, MS[38]#83312L, MS[39]#83313L, MS[40]#83314L, MS[41]#83315L, MS[42]#83316L, MS[43]#83317L, MS[44]#83318L, MS[45]#83319L, MS[46]#83320L, MS[47]#83321L, MS[48]#83322L, MS[49]#83323L, MS[50]#83324L, MS[51]#83325L, sum#83440L, sum#83441, sum#83442, count#83443L]
Keys [2]: [segment#83207, processing_day#83209]
Functions [5]: [count(1), approx_count_distinct(customer_id#83203L, 0.05, 0, 0), sum(events#83213), sum(weighted_amount#83215), avg(amount#83211)]
Aggregate Attributes [5]: [count(1)#83221L, approx_count_distinct(customer_id#83203L, 0.05, 0, 0)#83326L, sum(events#83213)#83327L, sum(weighted_amount#83215)#83328, avg(amount#83211)#83329]
Results [7]: [segment#83207, processing_day#83209, count(1)#83221L AS row_count#83216L, approx_count_distinct(customer_id#83203L, 0.05, 0, 0)#83326L AS unique_customers#83217L, sum(events#83213)#83327L AS event_sum#83218L, sum(weighted_amount#83215)#83328 AS weighted_amount_sum#83219, avg(amount#83211)#83329 AS avg_amount#83220]
(9) Exchange
Input [7]: [segment#83207, processing_day#83209, row_count#83216L, unique_customers#83217L, event_sum#83218L, weighted_amount_sum#83219, avg_amount#83220]
Arguments: rangepartitioning(segment#83207 ASC NULLS FIRST, processing_day#83209 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=7885]
(10) ShuffleQueryStage
Output [7]: [segment#83207, processing_day#83209, row_count#83216L, unique_customers#83217L, event_sum#83218L, weighted_amount_sum#83219, avg_amount#83220]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#83207, processing_day#83209, row_count#83216L, unique_customers#83217L, event_sum#83218L, weighted_amount_sum#83219, avg_amount#83220]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#83207, processing_day#83209, row_count#83216L, unique_customers#83217L, event_sum#83218L, weighted_amount_sum#83219, avg_amount#83220]
Arguments: [segment#83207 ASC NULLS FIRST, processing_day#83209 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#83207, processing_day#83209, row_count#83216L, unique_customers#83217L, event_sum#83218L, weighted_amount_sum#83219, avg_amount#83220]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#83203L, segment#83207, processing_day#83209, amount#83211, events#83213, weighted_amount#83215]
Keys [2]: [segment#83207, processing_day#83209]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#83203L, 0.05, 0, 0), partial_sum(events#83213), partial_sum(weighted_amount#83215), partial_avg(amount#83211)]
Aggregate Attributes [57]: [count#83434L, MS[0]#83222L, MS[1]#83223L, MS[2]#83224L, MS[3]#83225L, MS[4]#83226L, MS[5]#83227L, MS[6]#83228L, MS[7]#83229L, MS[8]#83230L, MS[9]#83231L, MS[10]#83232L, MS[11]#83233L, MS[12]#83234L, MS[13]#83235L, MS[14]#83236L, MS[15]#83237L, MS[16]#83238L, MS[17]#83239L, MS[18]#83240L, MS[19]#83241L, MS[20]#83242L, MS[21]#83243L, MS[22]#83244L, MS[23]#83245L, MS[24]#83246L, MS[25]#83247L, MS[26]#83248L, MS[27]#83249L, MS[28]#83250L, MS[29]#83251L, MS[30]#83252L, MS[31]#83253L, MS[32]#83254L, MS[33]#83255L, MS[34]#83256L, MS[35]#83257L, MS[36]#83258L, MS[37]#83259L, MS[38]#83260L, MS[39]#83261L, MS[40]#83262L, MS[41]#83263L, MS[42]#83264L, MS[43]#83265L, MS[44]#83266L, MS[45]#83267L, MS[46]#83268L, MS[47]#83269L, MS[48]#83270L, MS[49]#83271L, MS[50]#83272L, MS[51]#83273L, sum#83435L, sum#83436, sum#83437, count#83438L]
Results [59]: [segment#83207, processing_day#83209, count#83439L, MS[0]#83274L, MS[1]#83275L, MS[2]#83276L, MS[3]#83277L, MS[4]#83278L, MS[5]#83279L, MS[6]#83280L, MS[7]#83281L, MS[8]#83282L, MS[9]#83283L, MS[10]#83284L, MS[11]#83285L, MS[12]#83286L, MS[13]#83287L, MS[14]#83288L, MS[15]#83289L, MS[16]#83290L, MS[17]#83291L, MS[18]#83292L, MS[19]#83293L, MS[20]#83294L, MS[21]#83295L, MS[22]#83296L, MS[23]#83297L, MS[24]#83298L, MS[25]#83299L, MS[26]#83300L, MS[27]#83301L, MS[28]#83302L, MS[29]#83303L, MS[30]#83304L, MS[31]#83305L, MS[32]#83306L, MS[33]#83307L, MS[34]#83308L, MS[35]#83309L, MS[36]#83310L, MS[37]#83311L, MS[38]#83312L, MS[39]#83313L, MS[40]#83314L, MS[41]#83315L, MS[42]#83316L, MS[43]#83317L, MS[44]#83318L, MS[45]#83319L, MS[46]#83320L, MS[47]#83321L, MS[48]#83322L, MS[49]#83323L, MS[50]#83324L, MS[51]#83325L, sum#83440L, sum#83441, sum#83442, count#83443L]
(15) Exchange
Input [59]: [segment#83207, processing_day#83209, count#83439L, MS[0]#83274L, MS[1]#83275L, MS[2]#83276L, MS[3]#83277L, MS[4]#83278L, MS[5]#83279L, MS[6]#83280L, MS[7]#83281L, MS[8]#83282L, MS[9]#83283L, MS[10]#83284L, MS[11]#83285L, MS[12]#83286L, MS[13]#83287L, MS[14]#83288L, MS[15]#83289L, MS[16]#83290L, MS[17]#83291L, MS[18]#83292L, MS[19]#83293L, MS[20]#83294L, MS[21]#83295L, MS[22]#83296L, MS[23]#83297L, MS[24]#83298L, MS[25]#83299L, MS[26]#83300L, MS[27]#83301L, MS[28]#83302L, MS[29]#83303L, MS[30]#83304L, MS[31]#83305L, MS[32]#83306L, MS[33]#83307L, MS[34]#83308L, MS[35]#83309L, MS[36]#83310L, MS[37]#83311L, MS[38]#83312L, MS[39]#83313L, MS[40]#83314L, MS[41]#83315L, MS[42]#83316L, MS[43]#83317L, MS[44]#83318L, MS[45]#83319L, MS[46]#83320L, MS[47]#83321L, MS[48]#83322L, MS[49]#83323L, MS[50]#83324L, MS[51]#83325L, sum#83440L, sum#83441, sum#83442, count#83443L]
Arguments: hashpartitioning(segment#83207, processing_day#83209, 200), ENSURE_REQUIREMENTS, [plan_id=7843]
(16) HashAggregate
Input [59]: [segment#83207, processing_day#83209, count#83439L, MS[0]#83274L, MS[1]#83275L, MS[2]#83276L, MS[3]#83277L, MS[4]#83278L, MS[5]#83279L, MS[6]#83280L, MS[7]#83281L, MS[8]#83282L, MS[9]#83283L, MS[10]#83284L, MS[11]#83285L, MS[12]#83286L, MS[13]#83287L, MS[14]#83288L, MS[15]#83289L, MS[16]#83290L, MS[17]#83291L, MS[18]#83292L, MS[19]#83293L, MS[20]#83294L, MS[21]#83295L, MS[22]#83296L, MS[23]#83297L, MS[24]#83298L, MS[25]#83299L, MS[26]#83300L, MS[27]#83301L, MS[28]#83302L, MS[29]#83303L, MS[30]#83304L, MS[31]#83305L, MS[32]#83306L, MS[33]#83307L, MS[34]#83308L, MS[35]#83309L, MS[36]#83310L, MS[37]#83311L, MS[38]#83312L, MS[39]#83313L, MS[40]#83314L, MS[41]#83315L, MS[42]#83316L, MS[43]#83317L, MS[44]#83318L, MS[45]#83319L, MS[46]#83320L, MS[47]#83321L, MS[48]#83322L, MS[49]#83323L, MS[50]#83324L, MS[51]#83325L, sum#83440L, sum#83441, sum#83442, count#83443L]
Keys [2]: [segment#83207, processing_day#83209]
Functions [5]: [count(1), approx_count_distinct(customer_id#83203L, 0.05, 0, 0), sum(events#83213), sum(weighted_amount#83215), avg(amount#83211)]
Aggregate Attributes [5]: [count(1)#83221L, approx_count_distinct(customer_id#83203L, 0.05, 0, 0)#83326L, sum(events#83213)#83327L, sum(weighted_amount#83215)#83328, avg(amount#83211)#83329]
Results [7]: [segment#83207, processing_day#83209, count(1)#83221L AS row_count#83216L, approx_count_distinct(customer_id#83203L, 0.05, 0, 0)#83326L AS unique_customers#83217L, sum(events#83213)#83327L AS event_sum#83218L, sum(weighted_amount#83215)#83328 AS weighted_amount_sum#83219, avg(amount#83211)#83329 AS avg_amount#83220]
(17) Exchange
Input [7]: [segment#83207, processing_day#83209, row_count#83216L, unique_customers#83217L, event_sum#83218L, weighted_amount_sum#83219, avg_amount#83220]
Arguments: rangepartitioning(segment#83207 ASC NULLS FIRST, processing_day#83209 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=7846]
(18) Sort
Input [7]: [segment#83207, processing_day#83209, row_count#83216L, unique_customers#83217L, event_sum#83218L, weighted_amount_sum#83219, avg_amount#83220]
Arguments: [segment#83207 ASC NULLS FIRST, processing_day#83209 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#83207, processing_day#83209, row_count#83216L, unique_customers#83217L, event_sum#83218L, weighted_amount_sum#83219, avg_amount#83220]
Arguments: isFinalPlan=true