== 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#98263L]
Arguments: Range (15000000, 16000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#98263L % 250000) AS customer_id#98265L, concat(segment-, cast(cast((id#98263L % 12) as int) as string)) AS segment#98269, cast((id#98263L % 14) as int) AS processing_day#98271, ((cast(((id#98263L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#98273, cast((((id#98263L * 29) % 7) + 1) as int) AS events#98275]
Input [1]: [id#98263L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#98265L, segment#98269, processing_day#98271, amount#98273, events#98275, (amount#98273 * cast(events#98275 as double)) AS weighted_amount#98277]
Input [5]: [customer_id#98265L, segment#98269, processing_day#98271, amount#98273, events#98275]
(4) HashAggregate
Input [6]: [customer_id#98265L, segment#98269, processing_day#98271, amount#98273, events#98275, weighted_amount#98277]
Keys [2]: [segment#98269, processing_day#98271]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#98265L, 0.05, 0, 0), partial_sum(events#98275), partial_sum(weighted_amount#98277), partial_avg(amount#98273)]
Aggregate Attributes [57]: [count#98496L, MS[0]#98284L, MS[1]#98285L, MS[2]#98286L, MS[3]#98287L, MS[4]#98288L, MS[5]#98289L, MS[6]#98290L, MS[7]#98291L, MS[8]#98292L, MS[9]#98293L, MS[10]#98294L, MS[11]#98295L, MS[12]#98296L, MS[13]#98297L, MS[14]#98298L, MS[15]#98299L, MS[16]#98300L, MS[17]#98301L, MS[18]#98302L, MS[19]#98303L, MS[20]#98304L, MS[21]#98305L, MS[22]#98306L, MS[23]#98307L, MS[24]#98308L, MS[25]#98309L, MS[26]#98310L, MS[27]#98311L, MS[28]#98312L, MS[29]#98313L, MS[30]#98314L, MS[31]#98315L, MS[32]#98316L, MS[33]#98317L, MS[34]#98318L, MS[35]#98319L, MS[36]#98320L, MS[37]#98321L, MS[38]#98322L, MS[39]#98323L, MS[40]#98324L, MS[41]#98325L, MS[42]#98326L, MS[43]#98327L, MS[44]#98328L, MS[45]#98329L, MS[46]#98330L, MS[47]#98331L, MS[48]#98332L, MS[49]#98333L, MS[50]#98334L, MS[51]#98335L, sum#98497L, sum#98498, sum#98499, count#98500L]
Results [59]: [segment#98269, processing_day#98271, count#98501L, MS[0]#98336L, MS[1]#98337L, MS[2]#98338L, MS[3]#98339L, MS[4]#98340L, MS[5]#98341L, MS[6]#98342L, MS[7]#98343L, MS[8]#98344L, MS[9]#98345L, MS[10]#98346L, MS[11]#98347L, MS[12]#98348L, MS[13]#98349L, MS[14]#98350L, MS[15]#98351L, MS[16]#98352L, MS[17]#98353L, MS[18]#98354L, MS[19]#98355L, MS[20]#98356L, MS[21]#98357L, MS[22]#98358L, MS[23]#98359L, MS[24]#98360L, MS[25]#98361L, MS[26]#98362L, MS[27]#98363L, MS[28]#98364L, MS[29]#98365L, MS[30]#98366L, MS[31]#98367L, MS[32]#98368L, MS[33]#98369L, MS[34]#98370L, MS[35]#98371L, MS[36]#98372L, MS[37]#98373L, MS[38]#98374L, MS[39]#98375L, MS[40]#98376L, MS[41]#98377L, MS[42]#98378L, MS[43]#98379L, MS[44]#98380L, MS[45]#98381L, MS[46]#98382L, MS[47]#98383L, MS[48]#98384L, MS[49]#98385L, MS[50]#98386L, MS[51]#98387L, sum#98502L, sum#98503, sum#98504, count#98505L]
(5) Exchange
Input [59]: [segment#98269, processing_day#98271, count#98501L, MS[0]#98336L, MS[1]#98337L, MS[2]#98338L, MS[3]#98339L, MS[4]#98340L, MS[5]#98341L, MS[6]#98342L, MS[7]#98343L, MS[8]#98344L, MS[9]#98345L, MS[10]#98346L, MS[11]#98347L, MS[12]#98348L, MS[13]#98349L, MS[14]#98350L, MS[15]#98351L, MS[16]#98352L, MS[17]#98353L, MS[18]#98354L, MS[19]#98355L, MS[20]#98356L, MS[21]#98357L, MS[22]#98358L, MS[23]#98359L, MS[24]#98360L, MS[25]#98361L, MS[26]#98362L, MS[27]#98363L, MS[28]#98364L, MS[29]#98365L, MS[30]#98366L, MS[31]#98367L, MS[32]#98368L, MS[33]#98369L, MS[34]#98370L, MS[35]#98371L, MS[36]#98372L, MS[37]#98373L, MS[38]#98374L, MS[39]#98375L, MS[40]#98376L, MS[41]#98377L, MS[42]#98378L, MS[43]#98379L, MS[44]#98380L, MS[45]#98381L, MS[46]#98382L, MS[47]#98383L, MS[48]#98384L, MS[49]#98385L, MS[50]#98386L, MS[51]#98387L, sum#98502L, sum#98503, sum#98504, count#98505L]
Arguments: hashpartitioning(segment#98269, processing_day#98271, 200), ENSURE_REQUIREMENTS, [plan_id=9280]
(6) ShuffleQueryStage
Output [59]: [segment#98269, processing_day#98271, count#98501L, MS[0]#98336L, MS[1]#98337L, MS[2]#98338L, MS[3]#98339L, MS[4]#98340L, MS[5]#98341L, MS[6]#98342L, MS[7]#98343L, MS[8]#98344L, MS[9]#98345L, MS[10]#98346L, MS[11]#98347L, MS[12]#98348L, MS[13]#98349L, MS[14]#98350L, MS[15]#98351L, MS[16]#98352L, MS[17]#98353L, MS[18]#98354L, MS[19]#98355L, MS[20]#98356L, MS[21]#98357L, MS[22]#98358L, MS[23]#98359L, MS[24]#98360L, MS[25]#98361L, MS[26]#98362L, MS[27]#98363L, MS[28]#98364L, MS[29]#98365L, MS[30]#98366L, MS[31]#98367L, MS[32]#98368L, MS[33]#98369L, MS[34]#98370L, MS[35]#98371L, MS[36]#98372L, MS[37]#98373L, MS[38]#98374L, MS[39]#98375L, MS[40]#98376L, MS[41]#98377L, MS[42]#98378L, MS[43]#98379L, MS[44]#98380L, MS[45]#98381L, MS[46]#98382L, MS[47]#98383L, MS[48]#98384L, MS[49]#98385L, MS[50]#98386L, MS[51]#98387L, sum#98502L, sum#98503, sum#98504, count#98505L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#98269, processing_day#98271, count#98501L, MS[0]#98336L, MS[1]#98337L, MS[2]#98338L, MS[3]#98339L, MS[4]#98340L, MS[5]#98341L, MS[6]#98342L, MS[7]#98343L, MS[8]#98344L, MS[9]#98345L, MS[10]#98346L, MS[11]#98347L, MS[12]#98348L, MS[13]#98349L, MS[14]#98350L, MS[15]#98351L, MS[16]#98352L, MS[17]#98353L, MS[18]#98354L, MS[19]#98355L, MS[20]#98356L, MS[21]#98357L, MS[22]#98358L, MS[23]#98359L, MS[24]#98360L, MS[25]#98361L, MS[26]#98362L, MS[27]#98363L, MS[28]#98364L, MS[29]#98365L, MS[30]#98366L, MS[31]#98367L, MS[32]#98368L, MS[33]#98369L, MS[34]#98370L, MS[35]#98371L, MS[36]#98372L, MS[37]#98373L, MS[38]#98374L, MS[39]#98375L, MS[40]#98376L, MS[41]#98377L, MS[42]#98378L, MS[43]#98379L, MS[44]#98380L, MS[45]#98381L, MS[46]#98382L, MS[47]#98383L, MS[48]#98384L, MS[49]#98385L, MS[50]#98386L, MS[51]#98387L, sum#98502L, sum#98503, sum#98504, count#98505L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#98269, processing_day#98271, count#98501L, MS[0]#98336L, MS[1]#98337L, MS[2]#98338L, MS[3]#98339L, MS[4]#98340L, MS[5]#98341L, MS[6]#98342L, MS[7]#98343L, MS[8]#98344L, MS[9]#98345L, MS[10]#98346L, MS[11]#98347L, MS[12]#98348L, MS[13]#98349L, MS[14]#98350L, MS[15]#98351L, MS[16]#98352L, MS[17]#98353L, MS[18]#98354L, MS[19]#98355L, MS[20]#98356L, MS[21]#98357L, MS[22]#98358L, MS[23]#98359L, MS[24]#98360L, MS[25]#98361L, MS[26]#98362L, MS[27]#98363L, MS[28]#98364L, MS[29]#98365L, MS[30]#98366L, MS[31]#98367L, MS[32]#98368L, MS[33]#98369L, MS[34]#98370L, MS[35]#98371L, MS[36]#98372L, MS[37]#98373L, MS[38]#98374L, MS[39]#98375L, MS[40]#98376L, MS[41]#98377L, MS[42]#98378L, MS[43]#98379L, MS[44]#98380L, MS[45]#98381L, MS[46]#98382L, MS[47]#98383L, MS[48]#98384L, MS[49]#98385L, MS[50]#98386L, MS[51]#98387L, sum#98502L, sum#98503, sum#98504, count#98505L]
Keys [2]: [segment#98269, processing_day#98271]
Functions [5]: [count(1), approx_count_distinct(customer_id#98265L, 0.05, 0, 0), sum(events#98275), sum(weighted_amount#98277), avg(amount#98273)]
Aggregate Attributes [5]: [count(1)#98283L, approx_count_distinct(customer_id#98265L, 0.05, 0, 0)#98388L, sum(events#98275)#98389L, sum(weighted_amount#98277)#98390, avg(amount#98273)#98391]
Results [7]: [segment#98269, processing_day#98271, count(1)#98283L AS row_count#98278L, approx_count_distinct(customer_id#98265L, 0.05, 0, 0)#98388L AS unique_customers#98279L, sum(events#98275)#98389L AS event_sum#98280L, sum(weighted_amount#98277)#98390 AS weighted_amount_sum#98281, avg(amount#98273)#98391 AS avg_amount#98282]
(9) Exchange
Input [7]: [segment#98269, processing_day#98271, row_count#98278L, unique_customers#98279L, event_sum#98280L, weighted_amount_sum#98281, avg_amount#98282]
Arguments: rangepartitioning(segment#98269 ASC NULLS FIRST, processing_day#98271 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=9302]
(10) ShuffleQueryStage
Output [7]: [segment#98269, processing_day#98271, row_count#98278L, unique_customers#98279L, event_sum#98280L, weighted_amount_sum#98281, avg_amount#98282]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#98269, processing_day#98271, row_count#98278L, unique_customers#98279L, event_sum#98280L, weighted_amount_sum#98281, avg_amount#98282]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#98269, processing_day#98271, row_count#98278L, unique_customers#98279L, event_sum#98280L, weighted_amount_sum#98281, avg_amount#98282]
Arguments: [segment#98269 ASC NULLS FIRST, processing_day#98271 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#98269, processing_day#98271, row_count#98278L, unique_customers#98279L, event_sum#98280L, weighted_amount_sum#98281, avg_amount#98282]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#98265L, segment#98269, processing_day#98271, amount#98273, events#98275, weighted_amount#98277]
Keys [2]: [segment#98269, processing_day#98271]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#98265L, 0.05, 0, 0), partial_sum(events#98275), partial_sum(weighted_amount#98277), partial_avg(amount#98273)]
Aggregate Attributes [57]: [count#98496L, MS[0]#98284L, MS[1]#98285L, MS[2]#98286L, MS[3]#98287L, MS[4]#98288L, MS[5]#98289L, MS[6]#98290L, MS[7]#98291L, MS[8]#98292L, MS[9]#98293L, MS[10]#98294L, MS[11]#98295L, MS[12]#98296L, MS[13]#98297L, MS[14]#98298L, MS[15]#98299L, MS[16]#98300L, MS[17]#98301L, MS[18]#98302L, MS[19]#98303L, MS[20]#98304L, MS[21]#98305L, MS[22]#98306L, MS[23]#98307L, MS[24]#98308L, MS[25]#98309L, MS[26]#98310L, MS[27]#98311L, MS[28]#98312L, MS[29]#98313L, MS[30]#98314L, MS[31]#98315L, MS[32]#98316L, MS[33]#98317L, MS[34]#98318L, MS[35]#98319L, MS[36]#98320L, MS[37]#98321L, MS[38]#98322L, MS[39]#98323L, MS[40]#98324L, MS[41]#98325L, MS[42]#98326L, MS[43]#98327L, MS[44]#98328L, MS[45]#98329L, MS[46]#98330L, MS[47]#98331L, MS[48]#98332L, MS[49]#98333L, MS[50]#98334L, MS[51]#98335L, sum#98497L, sum#98498, sum#98499, count#98500L]
Results [59]: [segment#98269, processing_day#98271, count#98501L, MS[0]#98336L, MS[1]#98337L, MS[2]#98338L, MS[3]#98339L, MS[4]#98340L, MS[5]#98341L, MS[6]#98342L, MS[7]#98343L, MS[8]#98344L, MS[9]#98345L, MS[10]#98346L, MS[11]#98347L, MS[12]#98348L, MS[13]#98349L, MS[14]#98350L, MS[15]#98351L, MS[16]#98352L, MS[17]#98353L, MS[18]#98354L, MS[19]#98355L, MS[20]#98356L, MS[21]#98357L, MS[22]#98358L, MS[23]#98359L, MS[24]#98360L, MS[25]#98361L, MS[26]#98362L, MS[27]#98363L, MS[28]#98364L, MS[29]#98365L, MS[30]#98366L, MS[31]#98367L, MS[32]#98368L, MS[33]#98369L, MS[34]#98370L, MS[35]#98371L, MS[36]#98372L, MS[37]#98373L, MS[38]#98374L, MS[39]#98375L, MS[40]#98376L, MS[41]#98377L, MS[42]#98378L, MS[43]#98379L, MS[44]#98380L, MS[45]#98381L, MS[46]#98382L, MS[47]#98383L, MS[48]#98384L, MS[49]#98385L, MS[50]#98386L, MS[51]#98387L, sum#98502L, sum#98503, sum#98504, count#98505L]
(15) Exchange
Input [59]: [segment#98269, processing_day#98271, count#98501L, MS[0]#98336L, MS[1]#98337L, MS[2]#98338L, MS[3]#98339L, MS[4]#98340L, MS[5]#98341L, MS[6]#98342L, MS[7]#98343L, MS[8]#98344L, MS[9]#98345L, MS[10]#98346L, MS[11]#98347L, MS[12]#98348L, MS[13]#98349L, MS[14]#98350L, MS[15]#98351L, MS[16]#98352L, MS[17]#98353L, MS[18]#98354L, MS[19]#98355L, MS[20]#98356L, MS[21]#98357L, MS[22]#98358L, MS[23]#98359L, MS[24]#98360L, MS[25]#98361L, MS[26]#98362L, MS[27]#98363L, MS[28]#98364L, MS[29]#98365L, MS[30]#98366L, MS[31]#98367L, MS[32]#98368L, MS[33]#98369L, MS[34]#98370L, MS[35]#98371L, MS[36]#98372L, MS[37]#98373L, MS[38]#98374L, MS[39]#98375L, MS[40]#98376L, MS[41]#98377L, MS[42]#98378L, MS[43]#98379L, MS[44]#98380L, MS[45]#98381L, MS[46]#98382L, MS[47]#98383L, MS[48]#98384L, MS[49]#98385L, MS[50]#98386L, MS[51]#98387L, sum#98502L, sum#98503, sum#98504, count#98505L]
Arguments: hashpartitioning(segment#98269, processing_day#98271, 200), ENSURE_REQUIREMENTS, [plan_id=9260]
(16) HashAggregate
Input [59]: [segment#98269, processing_day#98271, count#98501L, MS[0]#98336L, MS[1]#98337L, MS[2]#98338L, MS[3]#98339L, MS[4]#98340L, MS[5]#98341L, MS[6]#98342L, MS[7]#98343L, MS[8]#98344L, MS[9]#98345L, MS[10]#98346L, MS[11]#98347L, MS[12]#98348L, MS[13]#98349L, MS[14]#98350L, MS[15]#98351L, MS[16]#98352L, MS[17]#98353L, MS[18]#98354L, MS[19]#98355L, MS[20]#98356L, MS[21]#98357L, MS[22]#98358L, MS[23]#98359L, MS[24]#98360L, MS[25]#98361L, MS[26]#98362L, MS[27]#98363L, MS[28]#98364L, MS[29]#98365L, MS[30]#98366L, MS[31]#98367L, MS[32]#98368L, MS[33]#98369L, MS[34]#98370L, MS[35]#98371L, MS[36]#98372L, MS[37]#98373L, MS[38]#98374L, MS[39]#98375L, MS[40]#98376L, MS[41]#98377L, MS[42]#98378L, MS[43]#98379L, MS[44]#98380L, MS[45]#98381L, MS[46]#98382L, MS[47]#98383L, MS[48]#98384L, MS[49]#98385L, MS[50]#98386L, MS[51]#98387L, sum#98502L, sum#98503, sum#98504, count#98505L]
Keys [2]: [segment#98269, processing_day#98271]
Functions [5]: [count(1), approx_count_distinct(customer_id#98265L, 0.05, 0, 0), sum(events#98275), sum(weighted_amount#98277), avg(amount#98273)]
Aggregate Attributes [5]: [count(1)#98283L, approx_count_distinct(customer_id#98265L, 0.05, 0, 0)#98388L, sum(events#98275)#98389L, sum(weighted_amount#98277)#98390, avg(amount#98273)#98391]
Results [7]: [segment#98269, processing_day#98271, count(1)#98283L AS row_count#98278L, approx_count_distinct(customer_id#98265L, 0.05, 0, 0)#98388L AS unique_customers#98279L, sum(events#98275)#98389L AS event_sum#98280L, sum(weighted_amount#98277)#98390 AS weighted_amount_sum#98281, avg(amount#98273)#98391 AS avg_amount#98282]
(17) Exchange
Input [7]: [segment#98269, processing_day#98271, row_count#98278L, unique_customers#98279L, event_sum#98280L, weighted_amount_sum#98281, avg_amount#98282]
Arguments: rangepartitioning(segment#98269 ASC NULLS FIRST, processing_day#98271 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=9263]
(18) Sort
Input [7]: [segment#98269, processing_day#98271, row_count#98278L, unique_customers#98279L, event_sum#98280L, weighted_amount_sum#98281, avg_amount#98282]
Arguments: [segment#98269 ASC NULLS FIRST, processing_day#98271 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#98269, processing_day#98271, row_count#98278L, unique_customers#98279L, event_sum#98280L, weighted_amount_sum#98281, avg_amount#98282]
Arguments: isFinalPlan=true