== 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#93843L]
Arguments: Range (10000000, 11000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#93843L % 250000) AS customer_id#93845L, concat(segment-, cast(cast((id#93843L % 12) as int) as string)) AS segment#93849, cast((id#93843L % 14) as int) AS processing_day#93851, ((cast(((id#93843L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#93853, cast((((id#93843L * 29) % 7) + 1) as int) AS events#93855]
Input [1]: [id#93843L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#93845L, segment#93849, processing_day#93851, amount#93853, events#93855, (amount#93853 * cast(events#93855 as double)) AS weighted_amount#93857]
Input [5]: [customer_id#93845L, segment#93849, processing_day#93851, amount#93853, events#93855]
(4) HashAggregate
Input [6]: [customer_id#93845L, segment#93849, processing_day#93851, amount#93853, events#93855, weighted_amount#93857]
Keys [2]: [segment#93849, processing_day#93851]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#93845L, 0.05, 0, 0), partial_sum(events#93855), partial_sum(weighted_amount#93857), partial_avg(amount#93853)]
Aggregate Attributes [57]: [count#94076L, MS[0]#93864L, MS[1]#93865L, MS[2]#93866L, MS[3]#93867L, MS[4]#93868L, MS[5]#93869L, MS[6]#93870L, MS[7]#93871L, MS[8]#93872L, MS[9]#93873L, MS[10]#93874L, MS[11]#93875L, MS[12]#93876L, MS[13]#93877L, MS[14]#93878L, MS[15]#93879L, MS[16]#93880L, MS[17]#93881L, MS[18]#93882L, MS[19]#93883L, MS[20]#93884L, MS[21]#93885L, MS[22]#93886L, MS[23]#93887L, MS[24]#93888L, MS[25]#93889L, MS[26]#93890L, MS[27]#93891L, MS[28]#93892L, MS[29]#93893L, MS[30]#93894L, MS[31]#93895L, MS[32]#93896L, MS[33]#93897L, MS[34]#93898L, MS[35]#93899L, MS[36]#93900L, MS[37]#93901L, MS[38]#93902L, MS[39]#93903L, MS[40]#93904L, MS[41]#93905L, MS[42]#93906L, MS[43]#93907L, MS[44]#93908L, MS[45]#93909L, MS[46]#93910L, MS[47]#93911L, MS[48]#93912L, MS[49]#93913L, MS[50]#93914L, MS[51]#93915L, sum#94077L, sum#94078, sum#94079, count#94080L]
Results [59]: [segment#93849, processing_day#93851, count#94081L, MS[0]#93916L, MS[1]#93917L, MS[2]#93918L, MS[3]#93919L, MS[4]#93920L, MS[5]#93921L, MS[6]#93922L, MS[7]#93923L, MS[8]#93924L, MS[9]#93925L, MS[10]#93926L, MS[11]#93927L, MS[12]#93928L, MS[13]#93929L, MS[14]#93930L, MS[15]#93931L, MS[16]#93932L, MS[17]#93933L, MS[18]#93934L, MS[19]#93935L, MS[20]#93936L, MS[21]#93937L, MS[22]#93938L, MS[23]#93939L, MS[24]#93940L, MS[25]#93941L, MS[26]#93942L, MS[27]#93943L, MS[28]#93944L, MS[29]#93945L, MS[30]#93946L, MS[31]#93947L, MS[32]#93948L, MS[33]#93949L, MS[34]#93950L, MS[35]#93951L, MS[36]#93952L, MS[37]#93953L, MS[38]#93954L, MS[39]#93955L, MS[40]#93956L, MS[41]#93957L, MS[42]#93958L, MS[43]#93959L, MS[44]#93960L, MS[45]#93961L, MS[46]#93962L, MS[47]#93963L, MS[48]#93964L, MS[49]#93965L, MS[50]#93966L, MS[51]#93967L, sum#94082L, sum#94083, sum#94084, count#94085L]
(5) Exchange
Input [59]: [segment#93849, processing_day#93851, count#94081L, MS[0]#93916L, MS[1]#93917L, MS[2]#93918L, MS[3]#93919L, MS[4]#93920L, MS[5]#93921L, MS[6]#93922L, MS[7]#93923L, MS[8]#93924L, MS[9]#93925L, MS[10]#93926L, MS[11]#93927L, MS[12]#93928L, MS[13]#93929L, MS[14]#93930L, MS[15]#93931L, MS[16]#93932L, MS[17]#93933L, MS[18]#93934L, MS[19]#93935L, MS[20]#93936L, MS[21]#93937L, MS[22]#93938L, MS[23]#93939L, MS[24]#93940L, MS[25]#93941L, MS[26]#93942L, MS[27]#93943L, MS[28]#93944L, MS[29]#93945L, MS[30]#93946L, MS[31]#93947L, MS[32]#93948L, MS[33]#93949L, MS[34]#93950L, MS[35]#93951L, MS[36]#93952L, MS[37]#93953L, MS[38]#93954L, MS[39]#93955L, MS[40]#93956L, MS[41]#93957L, MS[42]#93958L, MS[43]#93959L, MS[44]#93960L, MS[45]#93961L, MS[46]#93962L, MS[47]#93963L, MS[48]#93964L, MS[49]#93965L, MS[50]#93966L, MS[51]#93967L, sum#94082L, sum#94083, sum#94084, count#94085L]
Arguments: hashpartitioning(segment#93849, processing_day#93851, 200), ENSURE_REQUIREMENTS, [plan_id=8865]
(6) ShuffleQueryStage
Output [59]: [segment#93849, processing_day#93851, count#94081L, MS[0]#93916L, MS[1]#93917L, MS[2]#93918L, MS[3]#93919L, MS[4]#93920L, MS[5]#93921L, MS[6]#93922L, MS[7]#93923L, MS[8]#93924L, MS[9]#93925L, MS[10]#93926L, MS[11]#93927L, MS[12]#93928L, MS[13]#93929L, MS[14]#93930L, MS[15]#93931L, MS[16]#93932L, MS[17]#93933L, MS[18]#93934L, MS[19]#93935L, MS[20]#93936L, MS[21]#93937L, MS[22]#93938L, MS[23]#93939L, MS[24]#93940L, MS[25]#93941L, MS[26]#93942L, MS[27]#93943L, MS[28]#93944L, MS[29]#93945L, MS[30]#93946L, MS[31]#93947L, MS[32]#93948L, MS[33]#93949L, MS[34]#93950L, MS[35]#93951L, MS[36]#93952L, MS[37]#93953L, MS[38]#93954L, MS[39]#93955L, MS[40]#93956L, MS[41]#93957L, MS[42]#93958L, MS[43]#93959L, MS[44]#93960L, MS[45]#93961L, MS[46]#93962L, MS[47]#93963L, MS[48]#93964L, MS[49]#93965L, MS[50]#93966L, MS[51]#93967L, sum#94082L, sum#94083, sum#94084, count#94085L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#93849, processing_day#93851, count#94081L, MS[0]#93916L, MS[1]#93917L, MS[2]#93918L, MS[3]#93919L, MS[4]#93920L, MS[5]#93921L, MS[6]#93922L, MS[7]#93923L, MS[8]#93924L, MS[9]#93925L, MS[10]#93926L, MS[11]#93927L, MS[12]#93928L, MS[13]#93929L, MS[14]#93930L, MS[15]#93931L, MS[16]#93932L, MS[17]#93933L, MS[18]#93934L, MS[19]#93935L, MS[20]#93936L, MS[21]#93937L, MS[22]#93938L, MS[23]#93939L, MS[24]#93940L, MS[25]#93941L, MS[26]#93942L, MS[27]#93943L, MS[28]#93944L, MS[29]#93945L, MS[30]#93946L, MS[31]#93947L, MS[32]#93948L, MS[33]#93949L, MS[34]#93950L, MS[35]#93951L, MS[36]#93952L, MS[37]#93953L, MS[38]#93954L, MS[39]#93955L, MS[40]#93956L, MS[41]#93957L, MS[42]#93958L, MS[43]#93959L, MS[44]#93960L, MS[45]#93961L, MS[46]#93962L, MS[47]#93963L, MS[48]#93964L, MS[49]#93965L, MS[50]#93966L, MS[51]#93967L, sum#94082L, sum#94083, sum#94084, count#94085L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#93849, processing_day#93851, count#94081L, MS[0]#93916L, MS[1]#93917L, MS[2]#93918L, MS[3]#93919L, MS[4]#93920L, MS[5]#93921L, MS[6]#93922L, MS[7]#93923L, MS[8]#93924L, MS[9]#93925L, MS[10]#93926L, MS[11]#93927L, MS[12]#93928L, MS[13]#93929L, MS[14]#93930L, MS[15]#93931L, MS[16]#93932L, MS[17]#93933L, MS[18]#93934L, MS[19]#93935L, MS[20]#93936L, MS[21]#93937L, MS[22]#93938L, MS[23]#93939L, MS[24]#93940L, MS[25]#93941L, MS[26]#93942L, MS[27]#93943L, MS[28]#93944L, MS[29]#93945L, MS[30]#93946L, MS[31]#93947L, MS[32]#93948L, MS[33]#93949L, MS[34]#93950L, MS[35]#93951L, MS[36]#93952L, MS[37]#93953L, MS[38]#93954L, MS[39]#93955L, MS[40]#93956L, MS[41]#93957L, MS[42]#93958L, MS[43]#93959L, MS[44]#93960L, MS[45]#93961L, MS[46]#93962L, MS[47]#93963L, MS[48]#93964L, MS[49]#93965L, MS[50]#93966L, MS[51]#93967L, sum#94082L, sum#94083, sum#94084, count#94085L]
Keys [2]: [segment#93849, processing_day#93851]
Functions [5]: [count(1), approx_count_distinct(customer_id#93845L, 0.05, 0, 0), sum(events#93855), sum(weighted_amount#93857), avg(amount#93853)]
Aggregate Attributes [5]: [count(1)#93863L, approx_count_distinct(customer_id#93845L, 0.05, 0, 0)#93968L, sum(events#93855)#93969L, sum(weighted_amount#93857)#93970, avg(amount#93853)#93971]
Results [7]: [segment#93849, processing_day#93851, count(1)#93863L AS row_count#93858L, approx_count_distinct(customer_id#93845L, 0.05, 0, 0)#93968L AS unique_customers#93859L, sum(events#93855)#93969L AS event_sum#93860L, sum(weighted_amount#93857)#93970 AS weighted_amount_sum#93861, avg(amount#93853)#93971 AS avg_amount#93862]
(9) Exchange
Input [7]: [segment#93849, processing_day#93851, row_count#93858L, unique_customers#93859L, event_sum#93860L, weighted_amount_sum#93861, avg_amount#93862]
Arguments: rangepartitioning(segment#93849 ASC NULLS FIRST, processing_day#93851 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=8887]
(10) ShuffleQueryStage
Output [7]: [segment#93849, processing_day#93851, row_count#93858L, unique_customers#93859L, event_sum#93860L, weighted_amount_sum#93861, avg_amount#93862]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#93849, processing_day#93851, row_count#93858L, unique_customers#93859L, event_sum#93860L, weighted_amount_sum#93861, avg_amount#93862]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#93849, processing_day#93851, row_count#93858L, unique_customers#93859L, event_sum#93860L, weighted_amount_sum#93861, avg_amount#93862]
Arguments: [segment#93849 ASC NULLS FIRST, processing_day#93851 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#93849, processing_day#93851, row_count#93858L, unique_customers#93859L, event_sum#93860L, weighted_amount_sum#93861, avg_amount#93862]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#93845L, segment#93849, processing_day#93851, amount#93853, events#93855, weighted_amount#93857]
Keys [2]: [segment#93849, processing_day#93851]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#93845L, 0.05, 0, 0), partial_sum(events#93855), partial_sum(weighted_amount#93857), partial_avg(amount#93853)]
Aggregate Attributes [57]: [count#94076L, MS[0]#93864L, MS[1]#93865L, MS[2]#93866L, MS[3]#93867L, MS[4]#93868L, MS[5]#93869L, MS[6]#93870L, MS[7]#93871L, MS[8]#93872L, MS[9]#93873L, MS[10]#93874L, MS[11]#93875L, MS[12]#93876L, MS[13]#93877L, MS[14]#93878L, MS[15]#93879L, MS[16]#93880L, MS[17]#93881L, MS[18]#93882L, MS[19]#93883L, MS[20]#93884L, MS[21]#93885L, MS[22]#93886L, MS[23]#93887L, MS[24]#93888L, MS[25]#93889L, MS[26]#93890L, MS[27]#93891L, MS[28]#93892L, MS[29]#93893L, MS[30]#93894L, MS[31]#93895L, MS[32]#93896L, MS[33]#93897L, MS[34]#93898L, MS[35]#93899L, MS[36]#93900L, MS[37]#93901L, MS[38]#93902L, MS[39]#93903L, MS[40]#93904L, MS[41]#93905L, MS[42]#93906L, MS[43]#93907L, MS[44]#93908L, MS[45]#93909L, MS[46]#93910L, MS[47]#93911L, MS[48]#93912L, MS[49]#93913L, MS[50]#93914L, MS[51]#93915L, sum#94077L, sum#94078, sum#94079, count#94080L]
Results [59]: [segment#93849, processing_day#93851, count#94081L, MS[0]#93916L, MS[1]#93917L, MS[2]#93918L, MS[3]#93919L, MS[4]#93920L, MS[5]#93921L, MS[6]#93922L, MS[7]#93923L, MS[8]#93924L, MS[9]#93925L, MS[10]#93926L, MS[11]#93927L, MS[12]#93928L, MS[13]#93929L, MS[14]#93930L, MS[15]#93931L, MS[16]#93932L, MS[17]#93933L, MS[18]#93934L, MS[19]#93935L, MS[20]#93936L, MS[21]#93937L, MS[22]#93938L, MS[23]#93939L, MS[24]#93940L, MS[25]#93941L, MS[26]#93942L, MS[27]#93943L, MS[28]#93944L, MS[29]#93945L, MS[30]#93946L, MS[31]#93947L, MS[32]#93948L, MS[33]#93949L, MS[34]#93950L, MS[35]#93951L, MS[36]#93952L, MS[37]#93953L, MS[38]#93954L, MS[39]#93955L, MS[40]#93956L, MS[41]#93957L, MS[42]#93958L, MS[43]#93959L, MS[44]#93960L, MS[45]#93961L, MS[46]#93962L, MS[47]#93963L, MS[48]#93964L, MS[49]#93965L, MS[50]#93966L, MS[51]#93967L, sum#94082L, sum#94083, sum#94084, count#94085L]
(15) Exchange
Input [59]: [segment#93849, processing_day#93851, count#94081L, MS[0]#93916L, MS[1]#93917L, MS[2]#93918L, MS[3]#93919L, MS[4]#93920L, MS[5]#93921L, MS[6]#93922L, MS[7]#93923L, MS[8]#93924L, MS[9]#93925L, MS[10]#93926L, MS[11]#93927L, MS[12]#93928L, MS[13]#93929L, MS[14]#93930L, MS[15]#93931L, MS[16]#93932L, MS[17]#93933L, MS[18]#93934L, MS[19]#93935L, MS[20]#93936L, MS[21]#93937L, MS[22]#93938L, MS[23]#93939L, MS[24]#93940L, MS[25]#93941L, MS[26]#93942L, MS[27]#93943L, MS[28]#93944L, MS[29]#93945L, MS[30]#93946L, MS[31]#93947L, MS[32]#93948L, MS[33]#93949L, MS[34]#93950L, MS[35]#93951L, MS[36]#93952L, MS[37]#93953L, MS[38]#93954L, MS[39]#93955L, MS[40]#93956L, MS[41]#93957L, MS[42]#93958L, MS[43]#93959L, MS[44]#93960L, MS[45]#93961L, MS[46]#93962L, MS[47]#93963L, MS[48]#93964L, MS[49]#93965L, MS[50]#93966L, MS[51]#93967L, sum#94082L, sum#94083, sum#94084, count#94085L]
Arguments: hashpartitioning(segment#93849, processing_day#93851, 200), ENSURE_REQUIREMENTS, [plan_id=8845]
(16) HashAggregate
Input [59]: [segment#93849, processing_day#93851, count#94081L, MS[0]#93916L, MS[1]#93917L, MS[2]#93918L, MS[3]#93919L, MS[4]#93920L, MS[5]#93921L, MS[6]#93922L, MS[7]#93923L, MS[8]#93924L, MS[9]#93925L, MS[10]#93926L, MS[11]#93927L, MS[12]#93928L, MS[13]#93929L, MS[14]#93930L, MS[15]#93931L, MS[16]#93932L, MS[17]#93933L, MS[18]#93934L, MS[19]#93935L, MS[20]#93936L, MS[21]#93937L, MS[22]#93938L, MS[23]#93939L, MS[24]#93940L, MS[25]#93941L, MS[26]#93942L, MS[27]#93943L, MS[28]#93944L, MS[29]#93945L, MS[30]#93946L, MS[31]#93947L, MS[32]#93948L, MS[33]#93949L, MS[34]#93950L, MS[35]#93951L, MS[36]#93952L, MS[37]#93953L, MS[38]#93954L, MS[39]#93955L, MS[40]#93956L, MS[41]#93957L, MS[42]#93958L, MS[43]#93959L, MS[44]#93960L, MS[45]#93961L, MS[46]#93962L, MS[47]#93963L, MS[48]#93964L, MS[49]#93965L, MS[50]#93966L, MS[51]#93967L, sum#94082L, sum#94083, sum#94084, count#94085L]
Keys [2]: [segment#93849, processing_day#93851]
Functions [5]: [count(1), approx_count_distinct(customer_id#93845L, 0.05, 0, 0), sum(events#93855), sum(weighted_amount#93857), avg(amount#93853)]
Aggregate Attributes [5]: [count(1)#93863L, approx_count_distinct(customer_id#93845L, 0.05, 0, 0)#93968L, sum(events#93855)#93969L, sum(weighted_amount#93857)#93970, avg(amount#93853)#93971]
Results [7]: [segment#93849, processing_day#93851, count(1)#93863L AS row_count#93858L, approx_count_distinct(customer_id#93845L, 0.05, 0, 0)#93968L AS unique_customers#93859L, sum(events#93855)#93969L AS event_sum#93860L, sum(weighted_amount#93857)#93970 AS weighted_amount_sum#93861, avg(amount#93853)#93971 AS avg_amount#93862]
(17) Exchange
Input [7]: [segment#93849, processing_day#93851, row_count#93858L, unique_customers#93859L, event_sum#93860L, weighted_amount_sum#93861, avg_amount#93862]
Arguments: rangepartitioning(segment#93849 ASC NULLS FIRST, processing_day#93851 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=8848]
(18) Sort
Input [7]: [segment#93849, processing_day#93851, row_count#93858L, unique_customers#93859L, event_sum#93860L, weighted_amount_sum#93861, avg_amount#93862]
Arguments: [segment#93849 ASC NULLS FIRST, processing_day#93851 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#93849, processing_day#93851, row_count#93858L, unique_customers#93859L, event_sum#93860L, weighted_amount_sum#93861, avg_amount#93862]
Arguments: isFinalPlan=true