== 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#62835L]
Arguments: Range (23000000, 24000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#62835L % 250000) AS customer_id#62837L, concat(segment-, cast(cast((id#62835L % 12) as int) as string)) AS segment#62841, cast((id#62835L % 14) as int) AS processing_day#62843, ((cast(((id#62835L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#62845, cast((((id#62835L * 29) % 7) + 1) as int) AS events#62847]
Input [1]: [id#62835L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#62837L, segment#62841, processing_day#62843, amount#62845, events#62847, (amount#62845 * cast(events#62847 as double)) AS weighted_amount#62849]
Input [5]: [customer_id#62837L, segment#62841, processing_day#62843, amount#62845, events#62847]
(4) HashAggregate
Input [6]: [customer_id#62837L, segment#62841, processing_day#62843, amount#62845, events#62847, weighted_amount#62849]
Keys [2]: [segment#62841, processing_day#62843]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#62837L, 0.05, 0, 0), partial_sum(events#62847), partial_sum(weighted_amount#62849), partial_avg(amount#62845)]
Aggregate Attributes [57]: [count#63068L, MS[0]#62856L, MS[1]#62857L, MS[2]#62858L, MS[3]#62859L, MS[4]#62860L, MS[5]#62861L, MS[6]#62862L, MS[7]#62863L, MS[8]#62864L, MS[9]#62865L, MS[10]#62866L, MS[11]#62867L, MS[12]#62868L, MS[13]#62869L, MS[14]#62870L, MS[15]#62871L, MS[16]#62872L, MS[17]#62873L, MS[18]#62874L, MS[19]#62875L, MS[20]#62876L, MS[21]#62877L, MS[22]#62878L, MS[23]#62879L, MS[24]#62880L, MS[25]#62881L, MS[26]#62882L, MS[27]#62883L, MS[28]#62884L, MS[29]#62885L, MS[30]#62886L, MS[31]#62887L, MS[32]#62888L, MS[33]#62889L, MS[34]#62890L, MS[35]#62891L, MS[36]#62892L, MS[37]#62893L, MS[38]#62894L, MS[39]#62895L, MS[40]#62896L, MS[41]#62897L, MS[42]#62898L, MS[43]#62899L, MS[44]#62900L, MS[45]#62901L, MS[46]#62902L, MS[47]#62903L, MS[48]#62904L, MS[49]#62905L, MS[50]#62906L, MS[51]#62907L, sum#63069L, sum#63070, sum#63071, count#63072L]
Results [59]: [segment#62841, processing_day#62843, count#63073L, MS[0]#62908L, MS[1]#62909L, MS[2]#62910L, MS[3]#62911L, MS[4]#62912L, MS[5]#62913L, MS[6]#62914L, MS[7]#62915L, MS[8]#62916L, MS[9]#62917L, MS[10]#62918L, MS[11]#62919L, MS[12]#62920L, MS[13]#62921L, MS[14]#62922L, MS[15]#62923L, MS[16]#62924L, MS[17]#62925L, MS[18]#62926L, MS[19]#62927L, MS[20]#62928L, MS[21]#62929L, MS[22]#62930L, MS[23]#62931L, MS[24]#62932L, MS[25]#62933L, MS[26]#62934L, MS[27]#62935L, MS[28]#62936L, MS[29]#62937L, MS[30]#62938L, MS[31]#62939L, MS[32]#62940L, MS[33]#62941L, MS[34]#62942L, MS[35]#62943L, MS[36]#62944L, MS[37]#62945L, MS[38]#62946L, MS[39]#62947L, MS[40]#62948L, MS[41]#62949L, MS[42]#62950L, MS[43]#62951L, MS[44]#62952L, MS[45]#62953L, MS[46]#62954L, MS[47]#62955L, MS[48]#62956L, MS[49]#62957L, MS[50]#62958L, MS[51]#62959L, sum#63074L, sum#63075, sum#63076, count#63077L]
(5) Exchange
Input [59]: [segment#62841, processing_day#62843, count#63073L, MS[0]#62908L, MS[1]#62909L, MS[2]#62910L, MS[3]#62911L, MS[4]#62912L, MS[5]#62913L, MS[6]#62914L, MS[7]#62915L, MS[8]#62916L, MS[9]#62917L, MS[10]#62918L, MS[11]#62919L, MS[12]#62920L, MS[13]#62921L, MS[14]#62922L, MS[15]#62923L, MS[16]#62924L, MS[17]#62925L, MS[18]#62926L, MS[19]#62927L, MS[20]#62928L, MS[21]#62929L, MS[22]#62930L, MS[23]#62931L, MS[24]#62932L, MS[25]#62933L, MS[26]#62934L, MS[27]#62935L, MS[28]#62936L, MS[29]#62937L, MS[30]#62938L, MS[31]#62939L, MS[32]#62940L, MS[33]#62941L, MS[34]#62942L, MS[35]#62943L, MS[36]#62944L, MS[37]#62945L, MS[38]#62946L, MS[39]#62947L, MS[40]#62948L, MS[41]#62949L, MS[42]#62950L, MS[43]#62951L, MS[44]#62952L, MS[45]#62953L, MS[46]#62954L, MS[47]#62955L, MS[48]#62956L, MS[49]#62957L, MS[50]#62958L, MS[51]#62959L, sum#63074L, sum#63075, sum#63076, count#63077L]
Arguments: hashpartitioning(segment#62841, processing_day#62843, 200), ENSURE_REQUIREMENTS, [plan_id=5948]
(6) ShuffleQueryStage
Output [59]: [segment#62841, processing_day#62843, count#63073L, MS[0]#62908L, MS[1]#62909L, MS[2]#62910L, MS[3]#62911L, MS[4]#62912L, MS[5]#62913L, MS[6]#62914L, MS[7]#62915L, MS[8]#62916L, MS[9]#62917L, MS[10]#62918L, MS[11]#62919L, MS[12]#62920L, MS[13]#62921L, MS[14]#62922L, MS[15]#62923L, MS[16]#62924L, MS[17]#62925L, MS[18]#62926L, MS[19]#62927L, MS[20]#62928L, MS[21]#62929L, MS[22]#62930L, MS[23]#62931L, MS[24]#62932L, MS[25]#62933L, MS[26]#62934L, MS[27]#62935L, MS[28]#62936L, MS[29]#62937L, MS[30]#62938L, MS[31]#62939L, MS[32]#62940L, MS[33]#62941L, MS[34]#62942L, MS[35]#62943L, MS[36]#62944L, MS[37]#62945L, MS[38]#62946L, MS[39]#62947L, MS[40]#62948L, MS[41]#62949L, MS[42]#62950L, MS[43]#62951L, MS[44]#62952L, MS[45]#62953L, MS[46]#62954L, MS[47]#62955L, MS[48]#62956L, MS[49]#62957L, MS[50]#62958L, MS[51]#62959L, sum#63074L, sum#63075, sum#63076, count#63077L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#62841, processing_day#62843, count#63073L, MS[0]#62908L, MS[1]#62909L, MS[2]#62910L, MS[3]#62911L, MS[4]#62912L, MS[5]#62913L, MS[6]#62914L, MS[7]#62915L, MS[8]#62916L, MS[9]#62917L, MS[10]#62918L, MS[11]#62919L, MS[12]#62920L, MS[13]#62921L, MS[14]#62922L, MS[15]#62923L, MS[16]#62924L, MS[17]#62925L, MS[18]#62926L, MS[19]#62927L, MS[20]#62928L, MS[21]#62929L, MS[22]#62930L, MS[23]#62931L, MS[24]#62932L, MS[25]#62933L, MS[26]#62934L, MS[27]#62935L, MS[28]#62936L, MS[29]#62937L, MS[30]#62938L, MS[31]#62939L, MS[32]#62940L, MS[33]#62941L, MS[34]#62942L, MS[35]#62943L, MS[36]#62944L, MS[37]#62945L, MS[38]#62946L, MS[39]#62947L, MS[40]#62948L, MS[41]#62949L, MS[42]#62950L, MS[43]#62951L, MS[44]#62952L, MS[45]#62953L, MS[46]#62954L, MS[47]#62955L, MS[48]#62956L, MS[49]#62957L, MS[50]#62958L, MS[51]#62959L, sum#63074L, sum#63075, sum#63076, count#63077L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#62841, processing_day#62843, count#63073L, MS[0]#62908L, MS[1]#62909L, MS[2]#62910L, MS[3]#62911L, MS[4]#62912L, MS[5]#62913L, MS[6]#62914L, MS[7]#62915L, MS[8]#62916L, MS[9]#62917L, MS[10]#62918L, MS[11]#62919L, MS[12]#62920L, MS[13]#62921L, MS[14]#62922L, MS[15]#62923L, MS[16]#62924L, MS[17]#62925L, MS[18]#62926L, MS[19]#62927L, MS[20]#62928L, MS[21]#62929L, MS[22]#62930L, MS[23]#62931L, MS[24]#62932L, MS[25]#62933L, MS[26]#62934L, MS[27]#62935L, MS[28]#62936L, MS[29]#62937L, MS[30]#62938L, MS[31]#62939L, MS[32]#62940L, MS[33]#62941L, MS[34]#62942L, MS[35]#62943L, MS[36]#62944L, MS[37]#62945L, MS[38]#62946L, MS[39]#62947L, MS[40]#62948L, MS[41]#62949L, MS[42]#62950L, MS[43]#62951L, MS[44]#62952L, MS[45]#62953L, MS[46]#62954L, MS[47]#62955L, MS[48]#62956L, MS[49]#62957L, MS[50]#62958L, MS[51]#62959L, sum#63074L, sum#63075, sum#63076, count#63077L]
Keys [2]: [segment#62841, processing_day#62843]
Functions [5]: [count(1), approx_count_distinct(customer_id#62837L, 0.05, 0, 0), sum(events#62847), sum(weighted_amount#62849), avg(amount#62845)]
Aggregate Attributes [5]: [count(1)#62855L, approx_count_distinct(customer_id#62837L, 0.05, 0, 0)#62960L, sum(events#62847)#62961L, sum(weighted_amount#62849)#62962, avg(amount#62845)#62963]
Results [7]: [segment#62841, processing_day#62843, count(1)#62855L AS row_count#62850L, approx_count_distinct(customer_id#62837L, 0.05, 0, 0)#62960L AS unique_customers#62851L, sum(events#62847)#62961L AS event_sum#62852L, sum(weighted_amount#62849)#62962 AS weighted_amount_sum#62853, avg(amount#62845)#62963 AS avg_amount#62854]
(9) Exchange
Input [7]: [segment#62841, processing_day#62843, row_count#62850L, unique_customers#62851L, event_sum#62852L, weighted_amount_sum#62853, avg_amount#62854]
Arguments: rangepartitioning(segment#62841 ASC NULLS FIRST, processing_day#62843 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=5970]
(10) ShuffleQueryStage
Output [7]: [segment#62841, processing_day#62843, row_count#62850L, unique_customers#62851L, event_sum#62852L, weighted_amount_sum#62853, avg_amount#62854]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#62841, processing_day#62843, row_count#62850L, unique_customers#62851L, event_sum#62852L, weighted_amount_sum#62853, avg_amount#62854]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#62841, processing_day#62843, row_count#62850L, unique_customers#62851L, event_sum#62852L, weighted_amount_sum#62853, avg_amount#62854]
Arguments: [segment#62841 ASC NULLS FIRST, processing_day#62843 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#62841, processing_day#62843, row_count#62850L, unique_customers#62851L, event_sum#62852L, weighted_amount_sum#62853, avg_amount#62854]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#62837L, segment#62841, processing_day#62843, amount#62845, events#62847, weighted_amount#62849]
Keys [2]: [segment#62841, processing_day#62843]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#62837L, 0.05, 0, 0), partial_sum(events#62847), partial_sum(weighted_amount#62849), partial_avg(amount#62845)]
Aggregate Attributes [57]: [count#63068L, MS[0]#62856L, MS[1]#62857L, MS[2]#62858L, MS[3]#62859L, MS[4]#62860L, MS[5]#62861L, MS[6]#62862L, MS[7]#62863L, MS[8]#62864L, MS[9]#62865L, MS[10]#62866L, MS[11]#62867L, MS[12]#62868L, MS[13]#62869L, MS[14]#62870L, MS[15]#62871L, MS[16]#62872L, MS[17]#62873L, MS[18]#62874L, MS[19]#62875L, MS[20]#62876L, MS[21]#62877L, MS[22]#62878L, MS[23]#62879L, MS[24]#62880L, MS[25]#62881L, MS[26]#62882L, MS[27]#62883L, MS[28]#62884L, MS[29]#62885L, MS[30]#62886L, MS[31]#62887L, MS[32]#62888L, MS[33]#62889L, MS[34]#62890L, MS[35]#62891L, MS[36]#62892L, MS[37]#62893L, MS[38]#62894L, MS[39]#62895L, MS[40]#62896L, MS[41]#62897L, MS[42]#62898L, MS[43]#62899L, MS[44]#62900L, MS[45]#62901L, MS[46]#62902L, MS[47]#62903L, MS[48]#62904L, MS[49]#62905L, MS[50]#62906L, MS[51]#62907L, sum#63069L, sum#63070, sum#63071, count#63072L]
Results [59]: [segment#62841, processing_day#62843, count#63073L, MS[0]#62908L, MS[1]#62909L, MS[2]#62910L, MS[3]#62911L, MS[4]#62912L, MS[5]#62913L, MS[6]#62914L, MS[7]#62915L, MS[8]#62916L, MS[9]#62917L, MS[10]#62918L, MS[11]#62919L, MS[12]#62920L, MS[13]#62921L, MS[14]#62922L, MS[15]#62923L, MS[16]#62924L, MS[17]#62925L, MS[18]#62926L, MS[19]#62927L, MS[20]#62928L, MS[21]#62929L, MS[22]#62930L, MS[23]#62931L, MS[24]#62932L, MS[25]#62933L, MS[26]#62934L, MS[27]#62935L, MS[28]#62936L, MS[29]#62937L, MS[30]#62938L, MS[31]#62939L, MS[32]#62940L, MS[33]#62941L, MS[34]#62942L, MS[35]#62943L, MS[36]#62944L, MS[37]#62945L, MS[38]#62946L, MS[39]#62947L, MS[40]#62948L, MS[41]#62949L, MS[42]#62950L, MS[43]#62951L, MS[44]#62952L, MS[45]#62953L, MS[46]#62954L, MS[47]#62955L, MS[48]#62956L, MS[49]#62957L, MS[50]#62958L, MS[51]#62959L, sum#63074L, sum#63075, sum#63076, count#63077L]
(15) Exchange
Input [59]: [segment#62841, processing_day#62843, count#63073L, MS[0]#62908L, MS[1]#62909L, MS[2]#62910L, MS[3]#62911L, MS[4]#62912L, MS[5]#62913L, MS[6]#62914L, MS[7]#62915L, MS[8]#62916L, MS[9]#62917L, MS[10]#62918L, MS[11]#62919L, MS[12]#62920L, MS[13]#62921L, MS[14]#62922L, MS[15]#62923L, MS[16]#62924L, MS[17]#62925L, MS[18]#62926L, MS[19]#62927L, MS[20]#62928L, MS[21]#62929L, MS[22]#62930L, MS[23]#62931L, MS[24]#62932L, MS[25]#62933L, MS[26]#62934L, MS[27]#62935L, MS[28]#62936L, MS[29]#62937L, MS[30]#62938L, MS[31]#62939L, MS[32]#62940L, MS[33]#62941L, MS[34]#62942L, MS[35]#62943L, MS[36]#62944L, MS[37]#62945L, MS[38]#62946L, MS[39]#62947L, MS[40]#62948L, MS[41]#62949L, MS[42]#62950L, MS[43]#62951L, MS[44]#62952L, MS[45]#62953L, MS[46]#62954L, MS[47]#62955L, MS[48]#62956L, MS[49]#62957L, MS[50]#62958L, MS[51]#62959L, sum#63074L, sum#63075, sum#63076, count#63077L]
Arguments: hashpartitioning(segment#62841, processing_day#62843, 200), ENSURE_REQUIREMENTS, [plan_id=5928]
(16) HashAggregate
Input [59]: [segment#62841, processing_day#62843, count#63073L, MS[0]#62908L, MS[1]#62909L, MS[2]#62910L, MS[3]#62911L, MS[4]#62912L, MS[5]#62913L, MS[6]#62914L, MS[7]#62915L, MS[8]#62916L, MS[9]#62917L, MS[10]#62918L, MS[11]#62919L, MS[12]#62920L, MS[13]#62921L, MS[14]#62922L, MS[15]#62923L, MS[16]#62924L, MS[17]#62925L, MS[18]#62926L, MS[19]#62927L, MS[20]#62928L, MS[21]#62929L, MS[22]#62930L, MS[23]#62931L, MS[24]#62932L, MS[25]#62933L, MS[26]#62934L, MS[27]#62935L, MS[28]#62936L, MS[29]#62937L, MS[30]#62938L, MS[31]#62939L, MS[32]#62940L, MS[33]#62941L, MS[34]#62942L, MS[35]#62943L, MS[36]#62944L, MS[37]#62945L, MS[38]#62946L, MS[39]#62947L, MS[40]#62948L, MS[41]#62949L, MS[42]#62950L, MS[43]#62951L, MS[44]#62952L, MS[45]#62953L, MS[46]#62954L, MS[47]#62955L, MS[48]#62956L, MS[49]#62957L, MS[50]#62958L, MS[51]#62959L, sum#63074L, sum#63075, sum#63076, count#63077L]
Keys [2]: [segment#62841, processing_day#62843]
Functions [5]: [count(1), approx_count_distinct(customer_id#62837L, 0.05, 0, 0), sum(events#62847), sum(weighted_amount#62849), avg(amount#62845)]
Aggregate Attributes [5]: [count(1)#62855L, approx_count_distinct(customer_id#62837L, 0.05, 0, 0)#62960L, sum(events#62847)#62961L, sum(weighted_amount#62849)#62962, avg(amount#62845)#62963]
Results [7]: [segment#62841, processing_day#62843, count(1)#62855L AS row_count#62850L, approx_count_distinct(customer_id#62837L, 0.05, 0, 0)#62960L AS unique_customers#62851L, sum(events#62847)#62961L AS event_sum#62852L, sum(weighted_amount#62849)#62962 AS weighted_amount_sum#62853, avg(amount#62845)#62963 AS avg_amount#62854]
(17) Exchange
Input [7]: [segment#62841, processing_day#62843, row_count#62850L, unique_customers#62851L, event_sum#62852L, weighted_amount_sum#62853, avg_amount#62854]
Arguments: rangepartitioning(segment#62841 ASC NULLS FIRST, processing_day#62843 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=5931]
(18) Sort
Input [7]: [segment#62841, processing_day#62843, row_count#62850L, unique_customers#62851L, event_sum#62852L, weighted_amount_sum#62853, avg_amount#62854]
Arguments: [segment#62841 ASC NULLS FIRST, processing_day#62843 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#62841, processing_day#62843, row_count#62850L, unique_customers#62851L, event_sum#62852L, weighted_amount_sum#62853, avg_amount#62854]
Arguments: isFinalPlan=true