== 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#7073L]
Arguments: Range (8000000, 9000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#7073L % 250000) AS customer_id#7075L, concat(segment-, cast(cast((id#7073L % 12) as int) as string)) AS segment#7079, cast((id#7073L % 14) as int) AS processing_day#7081, ((cast(((id#7073L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#7083, cast((((id#7073L * 29) % 7) + 1) as int) AS events#7085]
Input [1]: [id#7073L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#7075L, segment#7079, processing_day#7081, amount#7083, events#7085, (amount#7083 * cast(events#7085 as double)) AS weighted_amount#7087]
Input [5]: [customer_id#7075L, segment#7079, processing_day#7081, amount#7083, events#7085]
(4) HashAggregate
Input [6]: [customer_id#7075L, segment#7079, processing_day#7081, amount#7083, events#7085, weighted_amount#7087]
Keys [2]: [segment#7079, processing_day#7081]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#7075L, 0.05, 0, 0), partial_sum(events#7085), partial_sum(weighted_amount#7087), partial_avg(amount#7083)]
Aggregate Attributes [57]: [count#7306L, MS[0]#7094L, MS[1]#7095L, MS[2]#7096L, MS[3]#7097L, MS[4]#7098L, MS[5]#7099L, MS[6]#7100L, MS[7]#7101L, MS[8]#7102L, MS[9]#7103L, MS[10]#7104L, MS[11]#7105L, MS[12]#7106L, MS[13]#7107L, MS[14]#7108L, MS[15]#7109L, MS[16]#7110L, MS[17]#7111L, MS[18]#7112L, MS[19]#7113L, MS[20]#7114L, MS[21]#7115L, MS[22]#7116L, MS[23]#7117L, MS[24]#7118L, MS[25]#7119L, MS[26]#7120L, MS[27]#7121L, MS[28]#7122L, MS[29]#7123L, MS[30]#7124L, MS[31]#7125L, MS[32]#7126L, MS[33]#7127L, MS[34]#7128L, MS[35]#7129L, MS[36]#7130L, MS[37]#7131L, MS[38]#7132L, MS[39]#7133L, MS[40]#7134L, MS[41]#7135L, MS[42]#7136L, MS[43]#7137L, MS[44]#7138L, MS[45]#7139L, MS[46]#7140L, MS[47]#7141L, MS[48]#7142L, MS[49]#7143L, MS[50]#7144L, MS[51]#7145L, sum#7307L, sum#7308, sum#7309, count#7310L]
Results [59]: [segment#7079, processing_day#7081, count#7311L, MS[0]#7146L, MS[1]#7147L, MS[2]#7148L, MS[3]#7149L, MS[4]#7150L, MS[5]#7151L, MS[6]#7152L, MS[7]#7153L, MS[8]#7154L, MS[9]#7155L, MS[10]#7156L, MS[11]#7157L, MS[12]#7158L, MS[13]#7159L, MS[14]#7160L, MS[15]#7161L, MS[16]#7162L, MS[17]#7163L, MS[18]#7164L, MS[19]#7165L, MS[20]#7166L, MS[21]#7167L, MS[22]#7168L, MS[23]#7169L, MS[24]#7170L, MS[25]#7171L, MS[26]#7172L, MS[27]#7173L, MS[28]#7174L, MS[29]#7175L, MS[30]#7176L, MS[31]#7177L, MS[32]#7178L, MS[33]#7179L, MS[34]#7180L, MS[35]#7181L, MS[36]#7182L, MS[37]#7183L, MS[38]#7184L, MS[39]#7185L, MS[40]#7186L, MS[41]#7187L, MS[42]#7188L, MS[43]#7189L, MS[44]#7190L, MS[45]#7191L, MS[46]#7192L, MS[47]#7193L, MS[48]#7194L, MS[49]#7195L, MS[50]#7196L, MS[51]#7197L, sum#7312L, sum#7313, sum#7314, count#7315L]
(5) Exchange
Input [59]: [segment#7079, processing_day#7081, count#7311L, MS[0]#7146L, MS[1]#7147L, MS[2]#7148L, MS[3]#7149L, MS[4]#7150L, MS[5]#7151L, MS[6]#7152L, MS[7]#7153L, MS[8]#7154L, MS[9]#7155L, MS[10]#7156L, MS[11]#7157L, MS[12]#7158L, MS[13]#7159L, MS[14]#7160L, MS[15]#7161L, MS[16]#7162L, MS[17]#7163L, MS[18]#7164L, MS[19]#7165L, MS[20]#7166L, MS[21]#7167L, MS[22]#7168L, MS[23]#7169L, MS[24]#7170L, MS[25]#7171L, MS[26]#7172L, MS[27]#7173L, MS[28]#7174L, MS[29]#7175L, MS[30]#7176L, MS[31]#7177L, MS[32]#7178L, MS[33]#7179L, MS[34]#7180L, MS[35]#7181L, MS[36]#7182L, MS[37]#7183L, MS[38]#7184L, MS[39]#7185L, MS[40]#7186L, MS[41]#7187L, MS[42]#7188L, MS[43]#7189L, MS[44]#7190L, MS[45]#7191L, MS[46]#7192L, MS[47]#7193L, MS[48]#7194L, MS[49]#7195L, MS[50]#7196L, MS[51]#7197L, sum#7312L, sum#7313, sum#7314, count#7315L]
Arguments: hashpartitioning(segment#7079, processing_day#7081, 200), ENSURE_REQUIREMENTS, [plan_id=707]
(6) ShuffleQueryStage
Output [59]: [segment#7079, processing_day#7081, count#7311L, MS[0]#7146L, MS[1]#7147L, MS[2]#7148L, MS[3]#7149L, MS[4]#7150L, MS[5]#7151L, MS[6]#7152L, MS[7]#7153L, MS[8]#7154L, MS[9]#7155L, MS[10]#7156L, MS[11]#7157L, MS[12]#7158L, MS[13]#7159L, MS[14]#7160L, MS[15]#7161L, MS[16]#7162L, MS[17]#7163L, MS[18]#7164L, MS[19]#7165L, MS[20]#7166L, MS[21]#7167L, MS[22]#7168L, MS[23]#7169L, MS[24]#7170L, MS[25]#7171L, MS[26]#7172L, MS[27]#7173L, MS[28]#7174L, MS[29]#7175L, MS[30]#7176L, MS[31]#7177L, MS[32]#7178L, MS[33]#7179L, MS[34]#7180L, MS[35]#7181L, MS[36]#7182L, MS[37]#7183L, MS[38]#7184L, MS[39]#7185L, MS[40]#7186L, MS[41]#7187L, MS[42]#7188L, MS[43]#7189L, MS[44]#7190L, MS[45]#7191L, MS[46]#7192L, MS[47]#7193L, MS[48]#7194L, MS[49]#7195L, MS[50]#7196L, MS[51]#7197L, sum#7312L, sum#7313, sum#7314, count#7315L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#7079, processing_day#7081, count#7311L, MS[0]#7146L, MS[1]#7147L, MS[2]#7148L, MS[3]#7149L, MS[4]#7150L, MS[5]#7151L, MS[6]#7152L, MS[7]#7153L, MS[8]#7154L, MS[9]#7155L, MS[10]#7156L, MS[11]#7157L, MS[12]#7158L, MS[13]#7159L, MS[14]#7160L, MS[15]#7161L, MS[16]#7162L, MS[17]#7163L, MS[18]#7164L, MS[19]#7165L, MS[20]#7166L, MS[21]#7167L, MS[22]#7168L, MS[23]#7169L, MS[24]#7170L, MS[25]#7171L, MS[26]#7172L, MS[27]#7173L, MS[28]#7174L, MS[29]#7175L, MS[30]#7176L, MS[31]#7177L, MS[32]#7178L, MS[33]#7179L, MS[34]#7180L, MS[35]#7181L, MS[36]#7182L, MS[37]#7183L, MS[38]#7184L, MS[39]#7185L, MS[40]#7186L, MS[41]#7187L, MS[42]#7188L, MS[43]#7189L, MS[44]#7190L, MS[45]#7191L, MS[46]#7192L, MS[47]#7193L, MS[48]#7194L, MS[49]#7195L, MS[50]#7196L, MS[51]#7197L, sum#7312L, sum#7313, sum#7314, count#7315L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#7079, processing_day#7081, count#7311L, MS[0]#7146L, MS[1]#7147L, MS[2]#7148L, MS[3]#7149L, MS[4]#7150L, MS[5]#7151L, MS[6]#7152L, MS[7]#7153L, MS[8]#7154L, MS[9]#7155L, MS[10]#7156L, MS[11]#7157L, MS[12]#7158L, MS[13]#7159L, MS[14]#7160L, MS[15]#7161L, MS[16]#7162L, MS[17]#7163L, MS[18]#7164L, MS[19]#7165L, MS[20]#7166L, MS[21]#7167L, MS[22]#7168L, MS[23]#7169L, MS[24]#7170L, MS[25]#7171L, MS[26]#7172L, MS[27]#7173L, MS[28]#7174L, MS[29]#7175L, MS[30]#7176L, MS[31]#7177L, MS[32]#7178L, MS[33]#7179L, MS[34]#7180L, MS[35]#7181L, MS[36]#7182L, MS[37]#7183L, MS[38]#7184L, MS[39]#7185L, MS[40]#7186L, MS[41]#7187L, MS[42]#7188L, MS[43]#7189L, MS[44]#7190L, MS[45]#7191L, MS[46]#7192L, MS[47]#7193L, MS[48]#7194L, MS[49]#7195L, MS[50]#7196L, MS[51]#7197L, sum#7312L, sum#7313, sum#7314, count#7315L]
Keys [2]: [segment#7079, processing_day#7081]
Functions [5]: [count(1), approx_count_distinct(customer_id#7075L, 0.05, 0, 0), sum(events#7085), sum(weighted_amount#7087), avg(amount#7083)]
Aggregate Attributes [5]: [count(1)#7093L, approx_count_distinct(customer_id#7075L, 0.05, 0, 0)#7198L, sum(events#7085)#7199L, sum(weighted_amount#7087)#7200, avg(amount#7083)#7201]
Results [7]: [segment#7079, processing_day#7081, count(1)#7093L AS row_count#7088L, approx_count_distinct(customer_id#7075L, 0.05, 0, 0)#7198L AS unique_customers#7089L, sum(events#7085)#7199L AS event_sum#7090L, sum(weighted_amount#7087)#7200 AS weighted_amount_sum#7091, avg(amount#7083)#7201 AS avg_amount#7092]
(9) Exchange
Input [7]: [segment#7079, processing_day#7081, row_count#7088L, unique_customers#7089L, event_sum#7090L, weighted_amount_sum#7091, avg_amount#7092]
Arguments: rangepartitioning(segment#7079 ASC NULLS FIRST, processing_day#7081 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=729]
(10) ShuffleQueryStage
Output [7]: [segment#7079, processing_day#7081, row_count#7088L, unique_customers#7089L, event_sum#7090L, weighted_amount_sum#7091, avg_amount#7092]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#7079, processing_day#7081, row_count#7088L, unique_customers#7089L, event_sum#7090L, weighted_amount_sum#7091, avg_amount#7092]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#7079, processing_day#7081, row_count#7088L, unique_customers#7089L, event_sum#7090L, weighted_amount_sum#7091, avg_amount#7092]
Arguments: [segment#7079 ASC NULLS FIRST, processing_day#7081 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#7079, processing_day#7081, row_count#7088L, unique_customers#7089L, event_sum#7090L, weighted_amount_sum#7091, avg_amount#7092]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#7075L, segment#7079, processing_day#7081, amount#7083, events#7085, weighted_amount#7087]
Keys [2]: [segment#7079, processing_day#7081]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#7075L, 0.05, 0, 0), partial_sum(events#7085), partial_sum(weighted_amount#7087), partial_avg(amount#7083)]
Aggregate Attributes [57]: [count#7306L, MS[0]#7094L, MS[1]#7095L, MS[2]#7096L, MS[3]#7097L, MS[4]#7098L, MS[5]#7099L, MS[6]#7100L, MS[7]#7101L, MS[8]#7102L, MS[9]#7103L, MS[10]#7104L, MS[11]#7105L, MS[12]#7106L, MS[13]#7107L, MS[14]#7108L, MS[15]#7109L, MS[16]#7110L, MS[17]#7111L, MS[18]#7112L, MS[19]#7113L, MS[20]#7114L, MS[21]#7115L, MS[22]#7116L, MS[23]#7117L, MS[24]#7118L, MS[25]#7119L, MS[26]#7120L, MS[27]#7121L, MS[28]#7122L, MS[29]#7123L, MS[30]#7124L, MS[31]#7125L, MS[32]#7126L, MS[33]#7127L, MS[34]#7128L, MS[35]#7129L, MS[36]#7130L, MS[37]#7131L, MS[38]#7132L, MS[39]#7133L, MS[40]#7134L, MS[41]#7135L, MS[42]#7136L, MS[43]#7137L, MS[44]#7138L, MS[45]#7139L, MS[46]#7140L, MS[47]#7141L, MS[48]#7142L, MS[49]#7143L, MS[50]#7144L, MS[51]#7145L, sum#7307L, sum#7308, sum#7309, count#7310L]
Results [59]: [segment#7079, processing_day#7081, count#7311L, MS[0]#7146L, MS[1]#7147L, MS[2]#7148L, MS[3]#7149L, MS[4]#7150L, MS[5]#7151L, MS[6]#7152L, MS[7]#7153L, MS[8]#7154L, MS[9]#7155L, MS[10]#7156L, MS[11]#7157L, MS[12]#7158L, MS[13]#7159L, MS[14]#7160L, MS[15]#7161L, MS[16]#7162L, MS[17]#7163L, MS[18]#7164L, MS[19]#7165L, MS[20]#7166L, MS[21]#7167L, MS[22]#7168L, MS[23]#7169L, MS[24]#7170L, MS[25]#7171L, MS[26]#7172L, MS[27]#7173L, MS[28]#7174L, MS[29]#7175L, MS[30]#7176L, MS[31]#7177L, MS[32]#7178L, MS[33]#7179L, MS[34]#7180L, MS[35]#7181L, MS[36]#7182L, MS[37]#7183L, MS[38]#7184L, MS[39]#7185L, MS[40]#7186L, MS[41]#7187L, MS[42]#7188L, MS[43]#7189L, MS[44]#7190L, MS[45]#7191L, MS[46]#7192L, MS[47]#7193L, MS[48]#7194L, MS[49]#7195L, MS[50]#7196L, MS[51]#7197L, sum#7312L, sum#7313, sum#7314, count#7315L]
(15) Exchange
Input [59]: [segment#7079, processing_day#7081, count#7311L, MS[0]#7146L, MS[1]#7147L, MS[2]#7148L, MS[3]#7149L, MS[4]#7150L, MS[5]#7151L, MS[6]#7152L, MS[7]#7153L, MS[8]#7154L, MS[9]#7155L, MS[10]#7156L, MS[11]#7157L, MS[12]#7158L, MS[13]#7159L, MS[14]#7160L, MS[15]#7161L, MS[16]#7162L, MS[17]#7163L, MS[18]#7164L, MS[19]#7165L, MS[20]#7166L, MS[21]#7167L, MS[22]#7168L, MS[23]#7169L, MS[24]#7170L, MS[25]#7171L, MS[26]#7172L, MS[27]#7173L, MS[28]#7174L, MS[29]#7175L, MS[30]#7176L, MS[31]#7177L, MS[32]#7178L, MS[33]#7179L, MS[34]#7180L, MS[35]#7181L, MS[36]#7182L, MS[37]#7183L, MS[38]#7184L, MS[39]#7185L, MS[40]#7186L, MS[41]#7187L, MS[42]#7188L, MS[43]#7189L, MS[44]#7190L, MS[45]#7191L, MS[46]#7192L, MS[47]#7193L, MS[48]#7194L, MS[49]#7195L, MS[50]#7196L, MS[51]#7197L, sum#7312L, sum#7313, sum#7314, count#7315L]
Arguments: hashpartitioning(segment#7079, processing_day#7081, 200), ENSURE_REQUIREMENTS, [plan_id=687]
(16) HashAggregate
Input [59]: [segment#7079, processing_day#7081, count#7311L, MS[0]#7146L, MS[1]#7147L, MS[2]#7148L, MS[3]#7149L, MS[4]#7150L, MS[5]#7151L, MS[6]#7152L, MS[7]#7153L, MS[8]#7154L, MS[9]#7155L, MS[10]#7156L, MS[11]#7157L, MS[12]#7158L, MS[13]#7159L, MS[14]#7160L, MS[15]#7161L, MS[16]#7162L, MS[17]#7163L, MS[18]#7164L, MS[19]#7165L, MS[20]#7166L, MS[21]#7167L, MS[22]#7168L, MS[23]#7169L, MS[24]#7170L, MS[25]#7171L, MS[26]#7172L, MS[27]#7173L, MS[28]#7174L, MS[29]#7175L, MS[30]#7176L, MS[31]#7177L, MS[32]#7178L, MS[33]#7179L, MS[34]#7180L, MS[35]#7181L, MS[36]#7182L, MS[37]#7183L, MS[38]#7184L, MS[39]#7185L, MS[40]#7186L, MS[41]#7187L, MS[42]#7188L, MS[43]#7189L, MS[44]#7190L, MS[45]#7191L, MS[46]#7192L, MS[47]#7193L, MS[48]#7194L, MS[49]#7195L, MS[50]#7196L, MS[51]#7197L, sum#7312L, sum#7313, sum#7314, count#7315L]
Keys [2]: [segment#7079, processing_day#7081]
Functions [5]: [count(1), approx_count_distinct(customer_id#7075L, 0.05, 0, 0), sum(events#7085), sum(weighted_amount#7087), avg(amount#7083)]
Aggregate Attributes [5]: [count(1)#7093L, approx_count_distinct(customer_id#7075L, 0.05, 0, 0)#7198L, sum(events#7085)#7199L, sum(weighted_amount#7087)#7200, avg(amount#7083)#7201]
Results [7]: [segment#7079, processing_day#7081, count(1)#7093L AS row_count#7088L, approx_count_distinct(customer_id#7075L, 0.05, 0, 0)#7198L AS unique_customers#7089L, sum(events#7085)#7199L AS event_sum#7090L, sum(weighted_amount#7087)#7200 AS weighted_amount_sum#7091, avg(amount#7083)#7201 AS avg_amount#7092]
(17) Exchange
Input [7]: [segment#7079, processing_day#7081, row_count#7088L, unique_customers#7089L, event_sum#7090L, weighted_amount_sum#7091, avg_amount#7092]
Arguments: rangepartitioning(segment#7079 ASC NULLS FIRST, processing_day#7081 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=690]
(18) Sort
Input [7]: [segment#7079, processing_day#7081, row_count#7088L, unique_customers#7089L, event_sum#7090L, weighted_amount_sum#7091, avg_amount#7092]
Arguments: [segment#7079 ASC NULLS FIRST, processing_day#7081 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#7079, processing_day#7081, row_count#7088L, unique_customers#7089L, event_sum#7090L, weighted_amount_sum#7091, avg_amount#7092]
Arguments: isFinalPlan=true