== 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#91191L]
Arguments: Range (7000000, 8000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#91191L % 250000) AS customer_id#91193L, concat(segment-, cast(cast((id#91191L % 12) as int) as string)) AS segment#91197, cast((id#91191L % 14) as int) AS processing_day#91199, ((cast(((id#91191L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#91201, cast((((id#91191L * 29) % 7) + 1) as int) AS events#91203]
Input [1]: [id#91191L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#91193L, segment#91197, processing_day#91199, amount#91201, events#91203, (amount#91201 * cast(events#91203 as double)) AS weighted_amount#91205]
Input [5]: [customer_id#91193L, segment#91197, processing_day#91199, amount#91201, events#91203]
(4) HashAggregate
Input [6]: [customer_id#91193L, segment#91197, processing_day#91199, amount#91201, events#91203, weighted_amount#91205]
Keys [2]: [segment#91197, processing_day#91199]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#91193L, 0.05, 0, 0), partial_sum(events#91203), partial_sum(weighted_amount#91205), partial_avg(amount#91201)]
Aggregate Attributes [57]: [count#91424L, MS[0]#91212L, MS[1]#91213L, MS[2]#91214L, MS[3]#91215L, MS[4]#91216L, MS[5]#91217L, MS[6]#91218L, MS[7]#91219L, MS[8]#91220L, MS[9]#91221L, MS[10]#91222L, MS[11]#91223L, MS[12]#91224L, MS[13]#91225L, MS[14]#91226L, MS[15]#91227L, MS[16]#91228L, MS[17]#91229L, MS[18]#91230L, MS[19]#91231L, MS[20]#91232L, MS[21]#91233L, MS[22]#91234L, MS[23]#91235L, MS[24]#91236L, MS[25]#91237L, MS[26]#91238L, MS[27]#91239L, MS[28]#91240L, MS[29]#91241L, MS[30]#91242L, MS[31]#91243L, MS[32]#91244L, MS[33]#91245L, MS[34]#91246L, MS[35]#91247L, MS[36]#91248L, MS[37]#91249L, MS[38]#91250L, MS[39]#91251L, MS[40]#91252L, MS[41]#91253L, MS[42]#91254L, MS[43]#91255L, MS[44]#91256L, MS[45]#91257L, MS[46]#91258L, MS[47]#91259L, MS[48]#91260L, MS[49]#91261L, MS[50]#91262L, MS[51]#91263L, sum#91425L, sum#91426, sum#91427, count#91428L]
Results [59]: [segment#91197, processing_day#91199, count#91429L, MS[0]#91264L, MS[1]#91265L, MS[2]#91266L, MS[3]#91267L, MS[4]#91268L, MS[5]#91269L, MS[6]#91270L, MS[7]#91271L, MS[8]#91272L, MS[9]#91273L, MS[10]#91274L, MS[11]#91275L, MS[12]#91276L, MS[13]#91277L, MS[14]#91278L, MS[15]#91279L, MS[16]#91280L, MS[17]#91281L, MS[18]#91282L, MS[19]#91283L, MS[20]#91284L, MS[21]#91285L, MS[22]#91286L, MS[23]#91287L, MS[24]#91288L, MS[25]#91289L, MS[26]#91290L, MS[27]#91291L, MS[28]#91292L, MS[29]#91293L, MS[30]#91294L, MS[31]#91295L, MS[32]#91296L, MS[33]#91297L, MS[34]#91298L, MS[35]#91299L, MS[36]#91300L, MS[37]#91301L, MS[38]#91302L, MS[39]#91303L, MS[40]#91304L, MS[41]#91305L, MS[42]#91306L, MS[43]#91307L, MS[44]#91308L, MS[45]#91309L, MS[46]#91310L, MS[47]#91311L, MS[48]#91312L, MS[49]#91313L, MS[50]#91314L, MS[51]#91315L, sum#91430L, sum#91431, sum#91432, count#91433L]
(5) Exchange
Input [59]: [segment#91197, processing_day#91199, count#91429L, MS[0]#91264L, MS[1]#91265L, MS[2]#91266L, MS[3]#91267L, MS[4]#91268L, MS[5]#91269L, MS[6]#91270L, MS[7]#91271L, MS[8]#91272L, MS[9]#91273L, MS[10]#91274L, MS[11]#91275L, MS[12]#91276L, MS[13]#91277L, MS[14]#91278L, MS[15]#91279L, MS[16]#91280L, MS[17]#91281L, MS[18]#91282L, MS[19]#91283L, MS[20]#91284L, MS[21]#91285L, MS[22]#91286L, MS[23]#91287L, MS[24]#91288L, MS[25]#91289L, MS[26]#91290L, MS[27]#91291L, MS[28]#91292L, MS[29]#91293L, MS[30]#91294L, MS[31]#91295L, MS[32]#91296L, MS[33]#91297L, MS[34]#91298L, MS[35]#91299L, MS[36]#91300L, MS[37]#91301L, MS[38]#91302L, MS[39]#91303L, MS[40]#91304L, MS[41]#91305L, MS[42]#91306L, MS[43]#91307L, MS[44]#91308L, MS[45]#91309L, MS[46]#91310L, MS[47]#91311L, MS[48]#91312L, MS[49]#91313L, MS[50]#91314L, MS[51]#91315L, sum#91430L, sum#91431, sum#91432, count#91433L]
Arguments: hashpartitioning(segment#91197, processing_day#91199, 200), ENSURE_REQUIREMENTS, [plan_id=8616]
(6) ShuffleQueryStage
Output [59]: [segment#91197, processing_day#91199, count#91429L, MS[0]#91264L, MS[1]#91265L, MS[2]#91266L, MS[3]#91267L, MS[4]#91268L, MS[5]#91269L, MS[6]#91270L, MS[7]#91271L, MS[8]#91272L, MS[9]#91273L, MS[10]#91274L, MS[11]#91275L, MS[12]#91276L, MS[13]#91277L, MS[14]#91278L, MS[15]#91279L, MS[16]#91280L, MS[17]#91281L, MS[18]#91282L, MS[19]#91283L, MS[20]#91284L, MS[21]#91285L, MS[22]#91286L, MS[23]#91287L, MS[24]#91288L, MS[25]#91289L, MS[26]#91290L, MS[27]#91291L, MS[28]#91292L, MS[29]#91293L, MS[30]#91294L, MS[31]#91295L, MS[32]#91296L, MS[33]#91297L, MS[34]#91298L, MS[35]#91299L, MS[36]#91300L, MS[37]#91301L, MS[38]#91302L, MS[39]#91303L, MS[40]#91304L, MS[41]#91305L, MS[42]#91306L, MS[43]#91307L, MS[44]#91308L, MS[45]#91309L, MS[46]#91310L, MS[47]#91311L, MS[48]#91312L, MS[49]#91313L, MS[50]#91314L, MS[51]#91315L, sum#91430L, sum#91431, sum#91432, count#91433L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#91197, processing_day#91199, count#91429L, MS[0]#91264L, MS[1]#91265L, MS[2]#91266L, MS[3]#91267L, MS[4]#91268L, MS[5]#91269L, MS[6]#91270L, MS[7]#91271L, MS[8]#91272L, MS[9]#91273L, MS[10]#91274L, MS[11]#91275L, MS[12]#91276L, MS[13]#91277L, MS[14]#91278L, MS[15]#91279L, MS[16]#91280L, MS[17]#91281L, MS[18]#91282L, MS[19]#91283L, MS[20]#91284L, MS[21]#91285L, MS[22]#91286L, MS[23]#91287L, MS[24]#91288L, MS[25]#91289L, MS[26]#91290L, MS[27]#91291L, MS[28]#91292L, MS[29]#91293L, MS[30]#91294L, MS[31]#91295L, MS[32]#91296L, MS[33]#91297L, MS[34]#91298L, MS[35]#91299L, MS[36]#91300L, MS[37]#91301L, MS[38]#91302L, MS[39]#91303L, MS[40]#91304L, MS[41]#91305L, MS[42]#91306L, MS[43]#91307L, MS[44]#91308L, MS[45]#91309L, MS[46]#91310L, MS[47]#91311L, MS[48]#91312L, MS[49]#91313L, MS[50]#91314L, MS[51]#91315L, sum#91430L, sum#91431, sum#91432, count#91433L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#91197, processing_day#91199, count#91429L, MS[0]#91264L, MS[1]#91265L, MS[2]#91266L, MS[3]#91267L, MS[4]#91268L, MS[5]#91269L, MS[6]#91270L, MS[7]#91271L, MS[8]#91272L, MS[9]#91273L, MS[10]#91274L, MS[11]#91275L, MS[12]#91276L, MS[13]#91277L, MS[14]#91278L, MS[15]#91279L, MS[16]#91280L, MS[17]#91281L, MS[18]#91282L, MS[19]#91283L, MS[20]#91284L, MS[21]#91285L, MS[22]#91286L, MS[23]#91287L, MS[24]#91288L, MS[25]#91289L, MS[26]#91290L, MS[27]#91291L, MS[28]#91292L, MS[29]#91293L, MS[30]#91294L, MS[31]#91295L, MS[32]#91296L, MS[33]#91297L, MS[34]#91298L, MS[35]#91299L, MS[36]#91300L, MS[37]#91301L, MS[38]#91302L, MS[39]#91303L, MS[40]#91304L, MS[41]#91305L, MS[42]#91306L, MS[43]#91307L, MS[44]#91308L, MS[45]#91309L, MS[46]#91310L, MS[47]#91311L, MS[48]#91312L, MS[49]#91313L, MS[50]#91314L, MS[51]#91315L, sum#91430L, sum#91431, sum#91432, count#91433L]
Keys [2]: [segment#91197, processing_day#91199]
Functions [5]: [count(1), approx_count_distinct(customer_id#91193L, 0.05, 0, 0), sum(events#91203), sum(weighted_amount#91205), avg(amount#91201)]
Aggregate Attributes [5]: [count(1)#91211L, approx_count_distinct(customer_id#91193L, 0.05, 0, 0)#91316L, sum(events#91203)#91317L, sum(weighted_amount#91205)#91318, avg(amount#91201)#91319]
Results [7]: [segment#91197, processing_day#91199, count(1)#91211L AS row_count#91206L, approx_count_distinct(customer_id#91193L, 0.05, 0, 0)#91316L AS unique_customers#91207L, sum(events#91203)#91317L AS event_sum#91208L, sum(weighted_amount#91205)#91318 AS weighted_amount_sum#91209, avg(amount#91201)#91319 AS avg_amount#91210]
(9) Exchange
Input [7]: [segment#91197, processing_day#91199, row_count#91206L, unique_customers#91207L, event_sum#91208L, weighted_amount_sum#91209, avg_amount#91210]
Arguments: rangepartitioning(segment#91197 ASC NULLS FIRST, processing_day#91199 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=8638]
(10) ShuffleQueryStage
Output [7]: [segment#91197, processing_day#91199, row_count#91206L, unique_customers#91207L, event_sum#91208L, weighted_amount_sum#91209, avg_amount#91210]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#91197, processing_day#91199, row_count#91206L, unique_customers#91207L, event_sum#91208L, weighted_amount_sum#91209, avg_amount#91210]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#91197, processing_day#91199, row_count#91206L, unique_customers#91207L, event_sum#91208L, weighted_amount_sum#91209, avg_amount#91210]
Arguments: [segment#91197 ASC NULLS FIRST, processing_day#91199 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#91197, processing_day#91199, row_count#91206L, unique_customers#91207L, event_sum#91208L, weighted_amount_sum#91209, avg_amount#91210]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#91193L, segment#91197, processing_day#91199, amount#91201, events#91203, weighted_amount#91205]
Keys [2]: [segment#91197, processing_day#91199]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#91193L, 0.05, 0, 0), partial_sum(events#91203), partial_sum(weighted_amount#91205), partial_avg(amount#91201)]
Aggregate Attributes [57]: [count#91424L, MS[0]#91212L, MS[1]#91213L, MS[2]#91214L, MS[3]#91215L, MS[4]#91216L, MS[5]#91217L, MS[6]#91218L, MS[7]#91219L, MS[8]#91220L, MS[9]#91221L, MS[10]#91222L, MS[11]#91223L, MS[12]#91224L, MS[13]#91225L, MS[14]#91226L, MS[15]#91227L, MS[16]#91228L, MS[17]#91229L, MS[18]#91230L, MS[19]#91231L, MS[20]#91232L, MS[21]#91233L, MS[22]#91234L, MS[23]#91235L, MS[24]#91236L, MS[25]#91237L, MS[26]#91238L, MS[27]#91239L, MS[28]#91240L, MS[29]#91241L, MS[30]#91242L, MS[31]#91243L, MS[32]#91244L, MS[33]#91245L, MS[34]#91246L, MS[35]#91247L, MS[36]#91248L, MS[37]#91249L, MS[38]#91250L, MS[39]#91251L, MS[40]#91252L, MS[41]#91253L, MS[42]#91254L, MS[43]#91255L, MS[44]#91256L, MS[45]#91257L, MS[46]#91258L, MS[47]#91259L, MS[48]#91260L, MS[49]#91261L, MS[50]#91262L, MS[51]#91263L, sum#91425L, sum#91426, sum#91427, count#91428L]
Results [59]: [segment#91197, processing_day#91199, count#91429L, MS[0]#91264L, MS[1]#91265L, MS[2]#91266L, MS[3]#91267L, MS[4]#91268L, MS[5]#91269L, MS[6]#91270L, MS[7]#91271L, MS[8]#91272L, MS[9]#91273L, MS[10]#91274L, MS[11]#91275L, MS[12]#91276L, MS[13]#91277L, MS[14]#91278L, MS[15]#91279L, MS[16]#91280L, MS[17]#91281L, MS[18]#91282L, MS[19]#91283L, MS[20]#91284L, MS[21]#91285L, MS[22]#91286L, MS[23]#91287L, MS[24]#91288L, MS[25]#91289L, MS[26]#91290L, MS[27]#91291L, MS[28]#91292L, MS[29]#91293L, MS[30]#91294L, MS[31]#91295L, MS[32]#91296L, MS[33]#91297L, MS[34]#91298L, MS[35]#91299L, MS[36]#91300L, MS[37]#91301L, MS[38]#91302L, MS[39]#91303L, MS[40]#91304L, MS[41]#91305L, MS[42]#91306L, MS[43]#91307L, MS[44]#91308L, MS[45]#91309L, MS[46]#91310L, MS[47]#91311L, MS[48]#91312L, MS[49]#91313L, MS[50]#91314L, MS[51]#91315L, sum#91430L, sum#91431, sum#91432, count#91433L]
(15) Exchange
Input [59]: [segment#91197, processing_day#91199, count#91429L, MS[0]#91264L, MS[1]#91265L, MS[2]#91266L, MS[3]#91267L, MS[4]#91268L, MS[5]#91269L, MS[6]#91270L, MS[7]#91271L, MS[8]#91272L, MS[9]#91273L, MS[10]#91274L, MS[11]#91275L, MS[12]#91276L, MS[13]#91277L, MS[14]#91278L, MS[15]#91279L, MS[16]#91280L, MS[17]#91281L, MS[18]#91282L, MS[19]#91283L, MS[20]#91284L, MS[21]#91285L, MS[22]#91286L, MS[23]#91287L, MS[24]#91288L, MS[25]#91289L, MS[26]#91290L, MS[27]#91291L, MS[28]#91292L, MS[29]#91293L, MS[30]#91294L, MS[31]#91295L, MS[32]#91296L, MS[33]#91297L, MS[34]#91298L, MS[35]#91299L, MS[36]#91300L, MS[37]#91301L, MS[38]#91302L, MS[39]#91303L, MS[40]#91304L, MS[41]#91305L, MS[42]#91306L, MS[43]#91307L, MS[44]#91308L, MS[45]#91309L, MS[46]#91310L, MS[47]#91311L, MS[48]#91312L, MS[49]#91313L, MS[50]#91314L, MS[51]#91315L, sum#91430L, sum#91431, sum#91432, count#91433L]
Arguments: hashpartitioning(segment#91197, processing_day#91199, 200), ENSURE_REQUIREMENTS, [plan_id=8596]
(16) HashAggregate
Input [59]: [segment#91197, processing_day#91199, count#91429L, MS[0]#91264L, MS[1]#91265L, MS[2]#91266L, MS[3]#91267L, MS[4]#91268L, MS[5]#91269L, MS[6]#91270L, MS[7]#91271L, MS[8]#91272L, MS[9]#91273L, MS[10]#91274L, MS[11]#91275L, MS[12]#91276L, MS[13]#91277L, MS[14]#91278L, MS[15]#91279L, MS[16]#91280L, MS[17]#91281L, MS[18]#91282L, MS[19]#91283L, MS[20]#91284L, MS[21]#91285L, MS[22]#91286L, MS[23]#91287L, MS[24]#91288L, MS[25]#91289L, MS[26]#91290L, MS[27]#91291L, MS[28]#91292L, MS[29]#91293L, MS[30]#91294L, MS[31]#91295L, MS[32]#91296L, MS[33]#91297L, MS[34]#91298L, MS[35]#91299L, MS[36]#91300L, MS[37]#91301L, MS[38]#91302L, MS[39]#91303L, MS[40]#91304L, MS[41]#91305L, MS[42]#91306L, MS[43]#91307L, MS[44]#91308L, MS[45]#91309L, MS[46]#91310L, MS[47]#91311L, MS[48]#91312L, MS[49]#91313L, MS[50]#91314L, MS[51]#91315L, sum#91430L, sum#91431, sum#91432, count#91433L]
Keys [2]: [segment#91197, processing_day#91199]
Functions [5]: [count(1), approx_count_distinct(customer_id#91193L, 0.05, 0, 0), sum(events#91203), sum(weighted_amount#91205), avg(amount#91201)]
Aggregate Attributes [5]: [count(1)#91211L, approx_count_distinct(customer_id#91193L, 0.05, 0, 0)#91316L, sum(events#91203)#91317L, sum(weighted_amount#91205)#91318, avg(amount#91201)#91319]
Results [7]: [segment#91197, processing_day#91199, count(1)#91211L AS row_count#91206L, approx_count_distinct(customer_id#91193L, 0.05, 0, 0)#91316L AS unique_customers#91207L, sum(events#91203)#91317L AS event_sum#91208L, sum(weighted_amount#91205)#91318 AS weighted_amount_sum#91209, avg(amount#91201)#91319 AS avg_amount#91210]
(17) Exchange
Input [7]: [segment#91197, processing_day#91199, row_count#91206L, unique_customers#91207L, event_sum#91208L, weighted_amount_sum#91209, avg_amount#91210]
Arguments: rangepartitioning(segment#91197 ASC NULLS FIRST, processing_day#91199 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=8599]
(18) Sort
Input [7]: [segment#91197, processing_day#91199, row_count#91206L, unique_customers#91207L, event_sum#91208L, weighted_amount_sum#91209, avg_amount#91210]
Arguments: [segment#91197 ASC NULLS FIRST, processing_day#91199 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#91197, processing_day#91199, row_count#91206L, unique_customers#91207L, event_sum#91208L, weighted_amount_sum#91209, avg_amount#91210]
Arguments: isFinalPlan=true